[linux-next:master 5045/13299] arch/s390/include/asm/ctlreg.h:80:9: warning: array subscript 0 is outside array bounds of 'struct ctlreg[0]'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Heiko,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   2dac75696c6da3c848daa118a729827541c89d33
commit: 527618abb92793b9d4dba548d55822dcebd95317 [5045/13299] s390/ctlreg: add struct ctlreg
config: s390-buildonly-randconfig-r004-20220731 (https://download.01.org/0day-ci/archive/20231018/202310181800.Bh66q0T1-lkp@xxxxxxxxx/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231018/202310181800.Bh66q0T1-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202310181800.Bh66q0T1-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

   In file included from arch/s390/include/asm/lowcore.h:14,
                    from arch/s390/include/asm/current.h:13,
                    from arch/s390/include/asm/preempt.h:5,
                    from include/linux/preempt.h:79,
                    from arch/s390/include/asm/percpu.h:5,
                    from include/linux/irqflags.h:18,
                    from include/linux/rcupdate.h:26,
                    from include/linux/sysctl.h:26,
                    from arch/s390/mm/pgalloc.c:9:
   In function 'local_ctl_load',
       inlined from '__crst_table_upgrade' at arch/s390/mm/pgalloc.c:66:3:
>> arch/s390/include/asm/ctlreg.h:80:9: warning: array subscript 0 is outside array bounds of 'struct ctlreg[0]' [-Warray-bounds=]
      80 |         asm volatile(
         |         ^~~
   In function '__crst_table_upgrade':
   cc1: note: source object is likely at address zero


vim +80 arch/s390/include/asm/ctlreg.h

a0616cdebcfd57 arch/s390/include/asm/ctl_reg.h David Howells  2012-03-28  77  
527618abb92793 arch/s390/include/asm/ctlreg.h  Heiko Carstens 2023-09-11  78  static __always_inline void local_ctl_load(unsigned int cr, struct ctlreg *reg)
dfa33ce1245a4b arch/s390/include/asm/ctlreg.h  Heiko Carstens 2023-09-11  79  {
dfa33ce1245a4b arch/s390/include/asm/ctlreg.h  Heiko Carstens 2023-09-11 @80  	asm volatile(
dfa33ce1245a4b arch/s390/include/asm/ctlreg.h  Heiko Carstens 2023-09-11  81  		"	lctlg	%[cr],%[cr],%[reg]\n"
dfa33ce1245a4b arch/s390/include/asm/ctlreg.h  Heiko Carstens 2023-09-11  82  		:
dfa33ce1245a4b arch/s390/include/asm/ctlreg.h  Heiko Carstens 2023-09-11  83  		: [reg] "Q" (*reg), [cr] "i" (cr)
dfa33ce1245a4b arch/s390/include/asm/ctlreg.h  Heiko Carstens 2023-09-11  84  		: "memory");
dfa33ce1245a4b arch/s390/include/asm/ctlreg.h  Heiko Carstens 2023-09-11  85  }
dfa33ce1245a4b arch/s390/include/asm/ctlreg.h  Heiko Carstens 2023-09-11  86  

:::::: The code at line 80 was first introduced by commit
:::::: dfa33ce1245a4b88402947fa0a847e179044d2fc s390/ctlreg: add local_ctl_load() and local_ctl_store()

:::::: TO: Heiko Carstens <hca@xxxxxxxxxxxxx>
:::::: CC: Vasily Gorbik <gor@xxxxxxxxxxxxx>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux