[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210602094340.GI1271937@shao2-debian>
Date: Wed, 2 Jun 2021 17:43:41 +0800
From: kernel test robot <rong.a.chen@...el.com>
To: Mike Rapoport <rppt@...ux.ibm.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>
Subject: arch/h8300/kernel/setup.c:72:26: warning: Unused variable: region
[unusedVariable]
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@...el.com>
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@...rs.sourceforge.jp>
:::::: CC: Yoshinori Sato <ysato@...rs.sourceforge.jp>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists