aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
authorXishi Qiu <qiuxishi@huawei.com>2013-11-12 18:07:20 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:04 -0500
commitb38a872596dad80bd77d98f5fdbc58cc8f438dbb (patch)
tree7c52732ea81e29f2997fd59e6cf471baf490f2e5 /mm/page_alloc.c
parent83285c72e08c42848808039ef2d3b67a1bb88832 (diff)
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 <qiuxishi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c4
1 files changed, 2 insertions, 2 deletions
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)
4266 */ 4266 */
4267 zone->pageset = &boot_pageset; 4267 zone->pageset = &boot_pageset;
4268 4268
4269 if (zone->present_pages) 4269 if (populated_zone(zone))
4270 printk(KERN_DEBUG " %s zone: %lu pages, LIFO batch:%u\n", 4270 printk(KERN_DEBUG " %s zone: %lu pages, LIFO batch:%u\n",
4271 zone->name, zone->present_pages, 4271 zone->name, zone->present_pages,
4272 zone_batchsize(zone)); 4272 zone_batchsize(zone));
@@ -5160,7 +5160,7 @@ static void check_for_memory(pg_data_t *pgdat, int nid)
5160 5160
5161 for (zone_type = 0; zone_type <= ZONE_MOVABLE - 1; zone_type++) { 5161 for (zone_type = 0; zone_type <= ZONE_MOVABLE - 1; zone_type++) {
5162 struct zone *zone = &pgdat->node_zones[zone_type]; 5162 struct zone *zone = &pgdat->node_zones[zone_type];
5163 if (zone->present_pages) { 5163 if (populated_zone(zone)) {
5164 node_set_state(nid, N_HIGH_MEMORY); 5164 node_set_state(nid, N_HIGH_MEMORY);
5165 if (N_NORMAL_MEMORY != N_HIGH_MEMORY && 5165 if (N_NORMAL_MEMORY != N_HIGH_MEMORY &&
5166 zone_type <= ZONE_NORMAL) 5166 zone_type <= ZONE_NORMAL)