From: Xishi Qiu Date: Tue, 12 Nov 2013 23:07:20 +0000 (-0800) Subject: mm: use populated_zone() instead of if(zone->present_pages) X-Git-Tag: firefly_0821_release~176^2~4993^2~236 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b38a872596dad80bd77d98f5fdbc58cc8f438dbb;p=firefly-linux-kernel-4.4.55.git mm: use populated_zone() instead of if(zone->present_pages) Use "if (zone->present_pages)" instead of "if (zone->present_pages)". Simplify the code, no functional change. Signed-off-by: Xishi Qiu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 73d812f16dde..3d1d75a6629f 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4266,7 +4266,7 @@ static __meminit void zone_pcp_init(struct zone *zone) */ zone->pageset = &boot_pageset; - if (zone->present_pages) + if (populated_zone(zone)) printk(KERN_DEBUG " %s zone: %lu pages, LIFO batch:%u\n", zone->name, zone->present_pages, zone_batchsize(zone)); @@ -5160,7 +5160,7 @@ static void check_for_memory(pg_data_t *pgdat, int nid) for (zone_type = 0; zone_type <= ZONE_MOVABLE - 1; zone_type++) { struct zone *zone = &pgdat->node_zones[zone_type]; - if (zone->present_pages) { + if (populated_zone(zone)) { node_set_state(nid, N_HIGH_MEMORY); if (N_NORMAL_MEMORY != N_HIGH_MEMORY && zone_type <= ZONE_NORMAL)