Re: [PATCH] mm: populated_zone

From: Dave Hansen
Date: Thu Nov 17 2005 - 09:13:59 EST


On Fri, 2005-11-18 at 01:01 +1100, Con Kolivas wrote:
> +static inline int populated_zone(struct zone *zone)
> +{
> + return (!!zone->present_pages);
> +}

I really like when people do (zone->present_pages != 0) instead. I
always do a double-take at the !! stuff. Hard to understand at a
glance.

A good patch otherwise. I had to go change a bunch of reference to
present_pages to spanned_pages when testing memory hotplug, and this
would make doing that much easier.

-- Dave

-
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/