mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
memblock: __next_mem_pfn_range_in_zone: remove unneeded local variable nid
The nid is only used to act as output parameter of __next_mem_range. Since NULL can be passed to __next_mem_range as out_nid, we can thus remove nid by passing NULL here. Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> [rppt: updated the commit message] Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
This commit is contained in:
parent
dd45dc0711
commit
f30b002ccf
|
@ -1278,11 +1278,10 @@ __next_mem_pfn_range_in_zone(u64 *idx, struct zone *zone,
|
|||
{
|
||||
int zone_nid = zone_to_nid(zone);
|
||||
phys_addr_t spa, epa;
|
||||
int nid;
|
||||
|
||||
__next_mem_range(idx, zone_nid, MEMBLOCK_NONE,
|
||||
&memblock.memory, &memblock.reserved,
|
||||
&spa, &epa, &nid);
|
||||
&spa, &epa, NULL);
|
||||
|
||||
while (*idx != U64_MAX) {
|
||||
unsigned long epfn = PFN_DOWN(epa);
|
||||
|
@ -1309,7 +1308,7 @@ __next_mem_pfn_range_in_zone(u64 *idx, struct zone *zone,
|
|||
|
||||
__next_mem_range(idx, zone_nid, MEMBLOCK_NONE,
|
||||
&memblock.memory, &memblock.reserved,
|
||||
&spa, &epa, &nid);
|
||||
&spa, &epa, NULL);
|
||||
}
|
||||
|
||||
/* signal end of iteration */
|
||||
|
|
Loading…
Reference in a new issue