Commit b38a8725 authored by Xishi Qiu's avatar Xishi Qiu Committed by Linus Torvalds

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: default avatarXishi Qiu <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 83285c72
......@@ -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,
......@@ -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);
zone_type <= ZONE_NORMAL)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment