]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: use populated_zone() instead of if(zone->present_pages)
authorXishi Qiu <qiuxishi@huawei.com>
Tue, 5 Nov 2013 05:55:27 +0000 (16:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 5 Nov 2013 05:55:27 +0000 (16:55 +1100)
Use "if (zone->present_pages)" instead of "if (zone->present_pages)".
Simplify the code, no functional change.

Signed-off-by: Xishi Qiu <qiuxishi@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c

index dd886fac451ab6ab7d6a3132fd2587c10538f300..367606182fb7af4cf0954ffb564a29fd1e816bc0 100644 (file)
@@ -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)