summaryrefslogtreecommitdiff
path: root/arch/openrisc/mm
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.ibm.com>2021-05-09 12:11:02 +0300
committerStafford Horne <shorne@gmail.com>2021-05-10 00:22:31 +0300
commit4eff124347191d1548eb4e14e20e77513dcbd0fe (patch)
tree457a3382236b0c5121fa9a9e4d783acefcdd4ff6 /arch/openrisc/mm
parentc019d92457826bb7b2091c86f36adb5de08405f9 (diff)
downloadlinux-4eff124347191d1548eb4e14e20e77513dcbd0fe.tar.xz
openrisc: mm/init.c: remove unused memblock_region variable in map_ram()
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: b10d6bca8720 ("arch, drivers: replace for_each_membock() with for_each_mem_range()") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Stafford Horne <shorne@gmail.com>
Diffstat (limited to 'arch/openrisc/mm')
-rw-r--r--arch/openrisc/mm/init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/openrisc/mm/init.c b/arch/openrisc/mm/init.c
index bf9b2310fc93..f3fa02b8838a 100644
--- a/arch/openrisc/mm/init.c
+++ b/arch/openrisc/mm/init.c
@@ -75,7 +75,6 @@ static void __init map_ram(void)
/* These mark extents of read-only kernel pages...
* ...from vmlinux.lds.S
*/
- struct memblock_region *region;
v = PAGE_OFFSET;
@@ -121,7 +120,7 @@ static void __init map_ram(void)
}
printk(KERN_INFO "%s: Memory: 0x%x-0x%x\n", __func__,
- region->base, region->base + region->size);
+ start, end);
}
}