Re: [PATCH 02/17] mmzone: add various zone_*() helper functions.

2013-01-15 Thread Dave Hansen
On 01/15/2013 04:24 PM, Cody P Schafer wrote: > +static inline bool zone_is_empty(struct zone *zone) > +{ > + return zone->spanned_pages == 0; > +} Why did you choose spanned_pages for this? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [PATCH 02/17] mmzone: add various zone_*() helper functions.

2013-01-15 Thread Dave Hansen
On 01/15/2013 04:24 PM, Cody P Schafer wrote: > +static inline bool zone_spans_pfn(const struct zone *zone, unsigned long pfn) > +{ > + return zone->zone_start_pfn <= pfn && pfn < zone_end_pfn(zone); > +} This needs some parenthesis, just for readability. There's also no crime in breaking it

[PATCH 02/17] mmzone: add various zone_*() helper functions.

2013-01-15 Thread Cody P Schafer
From: Cody P Schafer Add zone_is_initialized(), zone_is_empty(), zone_spans_pfn(), and zone_end_pfn(). Signed-off-by: Cody P Schafer --- include/linux/mmzone.h | 20 1 file changed, 20 insertions(+) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 73b64a