Skip to content

Commit f30b002

Browse files
MiaoheLinrppt
authored andcommitted
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 <[email protected]> [rppt: updated the commit message] Signed-off-by: Mike Rapoport <[email protected]>
1 parent dd45dc0 commit f30b002

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

mm/memblock.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,11 +1278,10 @@ __next_mem_pfn_range_in_zone(u64 *idx, struct zone *zone,
12781278
{
12791279
int zone_nid = zone_to_nid(zone);
12801280
phys_addr_t spa, epa;
1281-
int nid;
12821281

12831282
__next_mem_range(idx, zone_nid, MEMBLOCK_NONE,
12841283
&memblock.memory, &memblock.reserved,
1285-
&spa, &epa, &nid);
1284+
&spa, &epa, NULL);
12861285

12871286
while (*idx != U64_MAX) {
12881287
unsigned long epfn = PFN_DOWN(epa);
@@ -1309,7 +1308,7 @@ __next_mem_pfn_range_in_zone(u64 *idx, struct zone *zone,
13091308

13101309
__next_mem_range(idx, zone_nid, MEMBLOCK_NONE,
13111310
&memblock.memory, &memblock.reserved,
1312-
&spa, &epa, &nid);
1311+
&spa, &epa, NULL);
13131312
}
13141313

13151314
/* signal end of iteration */

0 commit comments

Comments
 (0)