Skip to content

Commit d5c4605

Browse files
rpptgregkh
authored andcommitted
openrisc: mm/init.c: remove unused memblock_region variable in map_ram()
commit 4eff124 upstream. Kernel test robot reports: cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> arch/openrisc/mm/init.c:125:10: warning: Uninitialized variable: region [uninitvar] region->base, region->base + region->size); ^ Replace usage of memblock_region fields with 'start' and 'end' variables that are initialized in for_each_mem_range() and remove the declaration of region. Fixes: b10d6bc ("arch, drivers: replace for_each_membock() with for_each_mem_range()") Reported-by: kernel test robot <[email protected]> Signed-off-by: Mike Rapoport <[email protected]> Signed-off-by: Stafford Horne <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 585d842 commit d5c4605

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/openrisc/mm/init.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ static void __init map_ram(void)
7676
/* These mark extents of read-only kernel pages...
7777
* ...from vmlinux.lds.S
7878
*/
79-
struct memblock_region *region;
8079

8180
v = PAGE_OFFSET;
8281

@@ -122,7 +121,7 @@ static void __init map_ram(void)
122121
}
123122

124123
printk(KERN_INFO "%s: Memory: 0x%x-0x%x\n", __func__,
125-
region->base, region->base + region->size);
124+
start, end);
126125
}
127126
}
128127

0 commit comments

Comments
 (0)