Commit 6408068ee6ce9d80d66908a2c01a24ee88afd47d
Committed by
Linus Torvalds
1 parent
8bfa3f9a01
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
mm: use pgdat_end_pfn() to simplify the code in arch
Use "pgdat_end_pfn()" instead of "pgdat->node_start_pfn + pgdat->node_spanned_pages". Simplify the code, no functional change. Signed-off-by: Xishi Qiu <qiuxishi@huawei.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 4 changed files with 4 additions and 7 deletions Side-by-side Diff
arch/ia64/mm/init.c
... | ... | @@ -357,9 +357,7 @@ |
357 | 357 | |
358 | 358 | end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i]; |
359 | 359 | end_address = PAGE_ALIGN(end_address); |
360 | - | |
361 | - stop_address = (unsigned long) &vmem_map[ | |
362 | - pgdat->node_start_pfn + pgdat->node_spanned_pages]; | |
360 | + stop_address = (unsigned long) &vmem_map[pgdat_end_pfn(pgdat)]; | |
363 | 361 | |
364 | 362 | do { |
365 | 363 | pgd_t *pgd; |
arch/metag/mm/init.c
arch/powerpc/mm/numa.c
... | ... | @@ -938,8 +938,7 @@ |
938 | 938 | unsigned long start_pfn = physbase >> PAGE_SHIFT; |
939 | 939 | unsigned long end_pfn = PFN_UP(physbase + size); |
940 | 940 | struct node_active_region node_ar; |
941 | - unsigned long node_end_pfn = node->node_start_pfn + | |
942 | - node->node_spanned_pages; | |
941 | + unsigned long node_end_pfn = pgdat_end_pfn(node); | |
943 | 942 | |
944 | 943 | /* |
945 | 944 | * Check to make sure that this memblock.reserved area is |
arch/sh/mm/init.c