All of lore.kernel.org
 help / color / mirror / Atom feed
* [xilinx-xlnx:xlnx_rebase_v6.1_LTS 891/1363] include/linux/mtd/spi-nor.h:429:27: warning: array subscript 2 is above array bounds of 'struct spi_nor_flash_parameter * const[2]'
@ 2023-09-20  8:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-09-20  8:46 UTC (permalink / raw)
  To: Amit Kumar Mahapatra; +Cc: oe-kbuild-all, git, Michal Simek

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v6.1_LTS
head:   4f412ed20fd2c5353c1e878ef9ed77952a5040a1
commit: e500b96b4c8a5c61ab86c2a5bb1750abf2d59bf0 [891/1363] mtd: spi-nor: Add stacked memories support in spi-nor
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20230920/202309201656.ORxgHWeW-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230920/202309201656.ORxgHWeW-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309201656.ORxgHWeW-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from drivers/mtd/spi-nor/core.c:23:
   In function 'spi_nor_get_params',
       inlined from 'spi_nor_read' at drivers/mtd/spi-nor/core.c:1765:12:
>> include/linux/mtd/spi-nor.h:429:27: warning: array subscript 2 is above array bounds of 'struct spi_nor_flash_parameter * const[2]' [-Warray-bounds=]
     429 |         return nor->params[idx];
         |                ~~~~~~~~~~~^~~~~
   include/linux/mtd/spi-nor.h: In function 'spi_nor_read':
   include/linux/mtd/spi-nor.h:406:41: note: while referencing 'params'
     406 |         struct spi_nor_flash_parameter *params[SNOR_FLASH_CNT_MAX];
         |                                         ^~~~~~
   In function 'spi_nor_get_params',
       inlined from 'spi_nor_write' at drivers/mtd/spi-nor/core.c:1835:12:
>> include/linux/mtd/spi-nor.h:429:27: warning: array subscript 2 is above array bounds of 'struct spi_nor_flash_parameter * const[2]' [-Warray-bounds=]
     429 |         return nor->params[idx];
         |                ~~~~~~~~~~~^~~~~
   include/linux/mtd/spi-nor.h: In function 'spi_nor_write':
   include/linux/mtd/spi-nor.h:406:41: note: while referencing 'params'
     406 |         struct spi_nor_flash_parameter *params[SNOR_FLASH_CNT_MAX];
         |                                         ^~~~~~
   In function 'spi_nor_get_params',
       inlined from 'spi_nor_erase' at drivers/mtd/spi-nor/core.c:1552:13:
>> include/linux/mtd/spi-nor.h:429:27: warning: array subscript 2 is above array bounds of 'struct spi_nor_flash_parameter * const[2]' [-Warray-bounds=]
     429 |         return nor->params[idx];
         |                ~~~~~~~~~~~^~~~~
   include/linux/mtd/spi-nor.h: In function 'spi_nor_erase':
   include/linux/mtd/spi-nor.h:406:41: note: while referencing 'params'
     406 |         struct spi_nor_flash_parameter *params[SNOR_FLASH_CNT_MAX];
         |                                         ^~~~~~
   In function 'spi_nor_get_params',
       inlined from 'spi_nor_erase' at drivers/mtd/spi-nor/core.c:1508:13:
>> include/linux/mtd/spi-nor.h:429:27: warning: array subscript 2 is above array bounds of 'struct spi_nor_flash_parameter * const[2]' [-Warray-bounds=]
     429 |         return nor->params[idx];
         |                ~~~~~~~~~~~^~~~~
   include/linux/mtd/spi-nor.h: In function 'spi_nor_erase':
   include/linux/mtd/spi-nor.h:406:41: note: while referencing 'params'
     406 |         struct spi_nor_flash_parameter *params[SNOR_FLASH_CNT_MAX];
         |                                         ^~~~~~


vim +429 include/linux/mtd/spi-nor.h

   426	
   427	static inline struct spi_nor_flash_parameter *spi_nor_get_params(const struct spi_nor *nor, u8 idx)
   428	{
 > 429		return nor->params[idx];
   430	}
   431	

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

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

only message in thread, other threads:[~2023-09-20  8:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20  8:46 [xilinx-xlnx:xlnx_rebase_v6.1_LTS 891/1363] include/linux/mtd/spi-nor.h:429:27: warning: array subscript 2 is above array bounds of 'struct spi_nor_flash_parameter * const[2]' 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.