All of lore.kernel.org
 help / color / mirror / Atom feed
* [rppt:memblock/iterators-cleanup/v1 14/16] arch/riscv/mm/init.c:151:25: error: redeclaration of 'end' with no linkage
@ 2020-07-30 14:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-30 14:39 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4513 bytes --]

Hi Mike,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git memblock/iterators-cleanup/v1
head:   ed81b9564b7ba7e732e412530a4c330e281bb3a5
commit: 846f1f1ba3c1483bc769b583f708fbfca8aa50d2 [14/16] arch, drivers: replace for_each_membock() with for_each_mem_range()
config: riscv-randconfig-r022-20200730 (attached as .config)
compiler: riscv32-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 846f1f1ba3c1483bc769b583f708fbfca8aa50d2
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv 

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

All errors (new ones prefixed by >>):

   arch/riscv/mm/init.c: In function 'setup_bootmem':
>> arch/riscv/mm/init.c:151:25: error: redeclaration of 'end' with no linkage
     151 |  phys_addr_t mem_start, end = 0;
         |                         ^~~
   arch/riscv/mm/init.c:148:21: note: previous declaration of 'end' was here
     148 |  phys_addr_t start, end;
         |                     ^~~

vim +/end +151 arch/riscv/mm/init.c

922b0375fc93fb Albert Ou     2019-09-27  145  
0651c263c8e39f Anup Patel    2019-02-21  146  void __init setup_bootmem(void)
0651c263c8e39f Anup Patel    2019-02-21  147  {
846f1f1ba3c148 Mike Rapoport 2020-07-26  148  	phys_addr_t start, end;
0651c263c8e39f Anup Patel    2019-02-21  149  	phys_addr_t mem_size = 0;
fa5a198359053c Atish Patra   2020-07-15  150  	phys_addr_t total_mem = 0;
fa5a198359053c Atish Patra   2020-07-15 @151  	phys_addr_t mem_start, end = 0;
ac51e005fe1456 Zong Li       2020-01-02  152  	phys_addr_t vmlinux_end = __pa_symbol(&_end);
ac51e005fe1456 Zong Li       2020-01-02  153  	phys_addr_t vmlinux_start = __pa_symbol(&_start);
846f1f1ba3c148 Mike Rapoport 2020-07-26  154  	u64 i;
0651c263c8e39f Anup Patel    2019-02-21  155  
0651c263c8e39f Anup Patel    2019-02-21  156  	/* Find the memory region containing the kernel */
846f1f1ba3c148 Mike Rapoport 2020-07-26  157  	for_each_mem_range(i, &start, &end) {
846f1f1ba3c148 Mike Rapoport 2020-07-26  158  		phys_addr_t size = end - start;
fa5a198359053c Atish Patra   2020-07-15  159  		if (!total_mem)
846f1f1ba3c148 Mike Rapoport 2020-07-26  160  			mem_start = start;
846f1f1ba3c148 Mike Rapoport 2020-07-26  161  		if (start <= vmlinux_start && vmlinux_end <= end)
846f1f1ba3c148 Mike Rapoport 2020-07-26  162  			BUG_ON(size == 0);
846f1f1ba3c148 Mike Rapoport 2020-07-26  163  		total_mem = total_mem + size;
fa5a198359053c Atish Patra   2020-07-15  164  	}
f05badde4e20d2 Anup Patel    2019-04-05  165  
f05badde4e20d2 Anup Patel    2019-04-05  166  	/*
f05badde4e20d2 Anup Patel    2019-04-05  167  	 * Remove memblock from the end of usable area to the
f05badde4e20d2 Anup Patel    2019-04-05  168  	 * end of region
f05badde4e20d2 Anup Patel    2019-04-05  169  	 */
fa5a198359053c Atish Patra   2020-07-15  170  	mem_size = min(total_mem, (phys_addr_t)-PAGE_OFFSET);
fa5a198359053c Atish Patra   2020-07-15  171  	if (mem_start + mem_size < end)
fa5a198359053c Atish Patra   2020-07-15  172  		memblock_remove(mem_start + mem_size,
fa5a198359053c Atish Patra   2020-07-15  173  				end - mem_start - mem_size);
0651c263c8e39f Anup Patel    2019-02-21  174  
d90d45d7dcb732 Anup Patel    2019-06-07  175  	/* Reserve from the start of the kernel to the end of the kernel */
d90d45d7dcb732 Anup Patel    2019-06-07  176  	memblock_reserve(vmlinux_start, vmlinux_end - vmlinux_start);
d90d45d7dcb732 Anup Patel    2019-06-07  177  
c749bb2d554825 Vincent Chen  2020-04-27  178  	max_pfn = PFN_DOWN(memblock_end_of_DRAM());
c749bb2d554825 Vincent Chen  2020-04-27  179  	max_low_pfn = max_pfn;
d0d8aae64566b7 Atish Patra   2020-07-15  180  	set_max_mapnr(max_low_pfn);
0651c263c8e39f Anup Patel    2019-02-21  181  

:::::: The code@line 151 was first introduced by commit
:::::: fa5a198359053c8e21dcc2b39c0e13871059bc9f riscv: Parse all memory blocks to remove unusable memory

:::::: TO: Atish Patra <atish.patra@wdc.com>
:::::: CC: Palmer Dabbelt <palmerdabbelt@google.com>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 29048 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-30 14:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 14:39 [rppt:memblock/iterators-cleanup/v1 14/16] arch/riscv/mm/init.c:151:25: error: redeclaration of 'end' with no linkage kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.