mm/memory_hotplug: use pgdat_end_pfn() instead of open coding the same.
authorCody P Schafer <cody@linux.vnet.ibm.com>
Sat, 23 Feb 2013 00:35:32 +0000 (16:35 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 24 Feb 2013 01:50:21 +0000 (17:50 -0800)
Replace open coded pgdat_end_pfn() with helper function.

Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
Cc: David Hansen <dave@linux.vnet.ibm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory_hotplug.c

index 84fdcf5633c386cc30981bd9f70ec3fc92698956..b81a367b9f39bb056cc4127a674e8a3dd4d2567d 100644 (file)
@@ -218,7 +218,7 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
        }
 
        pfn = pgdat->node_start_pfn;
-       end_pfn = pfn + pgdat->node_spanned_pages;
+       end_pfn = pgdat_end_pfn(pgdat);
 
        /* register_section info */
        for (; pfn < end_pfn; pfn += PAGES_PER_SECTION) {