mm: use pgdat_end_pfn() to simplify the code in others
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> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
6408068ee6
commit
83285c72e0
@@ -255,8 +255,7 @@ static int kcore_update_ram(void)
|
||||
end_pfn = 0;
|
||||
for_each_node_state(nid, N_MEMORY) {
|
||||
unsigned long node_end;
|
||||
node_end = NODE_DATA(nid)->node_start_pfn +
|
||||
NODE_DATA(nid)->node_spanned_pages;
|
||||
node_end = node_end_pfn(nid);
|
||||
if (end_pfn < node_end)
|
||||
end_pfn = node_end;
|
||||
}
|
||||
|
Reference in New Issue
Block a user