summaryrefslogtreecommitdiff
path: root/mm/memblock.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-02-17 22:07:54 +0800
committerMike Rapoport <rppt@linux.ibm.com>2022-02-21 08:26:06 +0200
commitf30b002ccfee8c60c8feb590e145c0b5e8fa4c67 (patch)
tree8fd91cf299ca7a7ba75ae9d1f601a588ab2ce3c5 /mm/memblock.c
parentdd45dc071101a45619cbaff0f77d07abdf25caf0 (diff)
downloadlwn-f30b002ccfee8c60c8feb590e145c0b5e8fa4c67.tar.gz
lwn-f30b002ccfee8c60c8feb590e145c0b5e8fa4c67.zip
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>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r--mm/memblock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index 1018e50566f3..11561bbff8f5 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -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 */