Re: [PATCH 1/2] mm: hotplug: implement non-movable version ofget_user_pages() called get_user_pages_non_movable()

From: Michel Lespinasse
Date: Tue Feb 05 2013 - 21:27:01 EST


Just nitpicking, but:

On Tue, Feb 5, 2013 at 3:57 AM, Mel Gorman <mgorman@xxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/