From: kernel test robot <lkp@intel.com>
To: Amit Kumar Mahapatra <amit.kumar-mahapatra@amd.com>
Cc: oe-kbuild-all@lists.linux.dev, git@amd.com,
Michal Simek <monstr@monstr.eu>
Subject: [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]'
Date: Wed, 20 Sep 2023 16:46:40 +0800 [thread overview]
Message-ID: <202309201656.ORxgHWeW-lkp@intel.com> (raw)
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
reply other threads:[~2023-09-20 8:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202309201656.ORxgHWeW-lkp@intel.com \
--to=lkp@intel.com \
--cc=amit.kumar-mahapatra@amd.com \
--cc=git@amd.com \
--cc=monstr@monstr.eu \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.