Re: [PATCH 1/3] mm, compaction: change COMPACT_ constants into enum

2016-03-08 Thread Hillf Danton
> > From: Michal Hocko > > compaction code is doing weird dances between > COMPACT_FOO -> int -> unsigned long > > but there doesn't seem to be any reason for that. All functions which > return/use one of those constants are not expecting any other value > so it really makes sense to define an

Re: [PATCH 1/3] mm, compaction: change COMPACT_ constants into enum

2016-03-08 Thread Vlastimil Babka
On 03/08/2016 02:42 PM, Michal Hocko wrote: > From: Michal Hocko > > compaction code is doing weird dances between > COMPACT_FOO -> int -> unsigned long > > but there doesn't seem to be any reason for that. All functions which I vaguely recall trying this once and running into header dependency

[PATCH 1/3] mm, compaction: change COMPACT_ constants into enum

2016-03-08 Thread Michal Hocko
From: Michal Hocko compaction code is doing weird dances between COMPACT_FOO -> int -> unsigned long but there doesn't seem to be any reason for that. All functions which return/use one of those constants are not expecting any other value so it really makes sense to define an enum for them and m