From: Andrew Morton mm/page_alloc.c: In function 'check_for_regular_memory': mm/page_alloc.c:2427: error: 'nid' undeclared (first use in this function) mm/page_alloc.c:2427: error: (Each undeclared identifier is reported only once mm/page_alloc.c:2427: error: for each function it appears in.) Cc: Bob Picco Cc: Christoph Lameter Cc: KAMEZAWA Hiroyuki Cc: Lee Schermerhorn Cc: Mel Gorman Cc: Nishanth Aravamudan Signed-off-by: Andrew Morton --- mm/page_alloc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff -puN mm/page_alloc.c~memoryless-nodes-introduce-mask-of-nodes-with-memory-fix mm/page_alloc.c --- a/mm/page_alloc.c~memoryless-nodes-introduce-mask-of-nodes-with-memory-fix +++ a/mm/page_alloc.c @@ -2084,11 +2084,12 @@ static void build_zonelist_cache(pg_data static void check_for_regular_memory(pg_data_t *pgdat) { #ifdef CONFIG_HIGHMEM - enum zone_type zone; + enum zone_type zone_type; - for (zone = 0; zone <= ZONE_NORMAL; zone++) - if (pgdat->node_zones[zone].present_pages) - node_set_state(nid, N_NORMAL_MEMORY); + for (zone_type = 0; zone_type <= ZONE_NORMAL; zone_type++) { + struct zone *zone = &pgdat->node_zones[zone_type]; + if (zone->present_pages) + node_set_state(zone_to_nid(zone), N_NORMAL_MEMORY); } #endif } _