Messages in this thread | | | Date | Tue, 5 Feb 2013 18:26:51 -0800 | Subject | Re: [PATCH 1/2] mm: hotplug: implement non-movable version of get_user_pages() called get_user_pages_non_movable() | From | Michel Lespinasse <> |
| |
Just nitpicking, but:
On Tue, Feb 5, 2013 at 3:57 AM, Mel Gorman <mgorman@suse.de> wrote: > +static inline bool zone_is_idx(struct zone *zone, enum zone_type idx) > +{ > + /* This mess avoids a potentially expensive pointer subtraction. */ > + int zone_off = (char *)zone - (char *)zone->zone_pgdat->node_zones; > + return zone_off == idx * sizeof(*zone); > +}
Maybe: return zone == zone->zone_pgdat->node_zones + idx; ?
-- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies.
| |