arch/h8300/kernel/setup.c:72:26: warning: Unused variable: region [unusedVariable]

From: kernel test robot
Date: Wed Jun 02 2021 - 05:44:03 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c2131f7e73c9e9365613e323d65c7b9e5b910f56
commit: 80c4574417ae42fe2ba6978772854dc67cfc5331 h8300, nds32, openrisc: simplify detection of memory extents
date: 8 months ago
compiler: h8300-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/h8300/kernel/setup.c:72:26: warning: Unused variable: region [unusedVariable]
struct memblock_region *region;
^

vim +72 arch/h8300/kernel/setup.c

d8b0bdb444ed0e Yoshinori Sato 2015-05-11 69
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 70 static void __init bootmem_init(void)
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 71 {
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 @72 struct memblock_region *region;
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 73
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 74 memory_end = memory_start = 0;
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 75
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 76 /* Find main memory where is the kernel */
80c4574417ae42 Mike Rapoport 2020-10-13 77 memory_start = memblock_start_of_DRAM();
80c4574417ae42 Mike Rapoport 2020-10-13 78 memory_end = memblock_end_of_DRAM();
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 79
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 80 if (!memory_end)
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 81 panic("No memory!");
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 82
c489dfefe739d3 Rob Herring 2018-03-16 83 /* setup bootmem globals (we use no_bootmem, but mm still depends on this) */
c489dfefe739d3 Rob Herring 2018-03-16 84 min_low_pfn = PFN_UP(memory_start);
80c4574417ae42 Mike Rapoport 2020-10-13 85 max_low_pfn = PFN_DOWN(memory_end);
c489dfefe739d3 Rob Herring 2018-03-16 86 max_pfn = max_low_pfn;
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 87
c489dfefe739d3 Rob Herring 2018-03-16 88 memblock_reserve(__pa(_stext), _end - _stext);
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 89
c489dfefe739d3 Rob Herring 2018-03-16 90 early_init_fdt_reserve_self();
c489dfefe739d3 Rob Herring 2018-03-16 91 early_init_fdt_scan_reserved_mem();
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 92
c489dfefe739d3 Rob Herring 2018-03-16 93 memblock_dump_all();
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 94 }
d8b0bdb444ed0e Yoshinori Sato 2015-05-11 95

:::::: The code at line 72 was first introduced by commit
:::::: d8b0bdb444ed0e2bd5f9d3ea7412cb90bdec58cf h8300: kernel startup

:::::: TO: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>
:::::: CC: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx