[tip:irq/urgent 1/1] drivers/pci/msi/msi.c:763:25: error: 'nvec' undeclared; did you mean 'nvev'?
From: kernel test robot
Date: Sat Apr 15 2023 - 19:59:05 EST
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/urgent
head: 84d9651e13fb9820041d19262a55906851524c0f
commit: 84d9651e13fb9820041d19262a55906851524c0f [1/1] PCI/MSI: Remove over-zealous hardware size check in pci_msix_validate_entries()
config: ia64-randconfig-r002-20230416 (https://download.01.org/0day-ci/archive/20230416/202304160752.QJiM8zR3-lkp@xxxxxxxxx/config)
compiler: ia64-linux-gcc (GCC) 12.1.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
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=84d9651e13fb9820041d19262a55906851524c0f
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip irq/urgent
git checkout 84d9651e13fb9820041d19262a55906851524c0f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/pci/msi/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202304160752.QJiM8zR3-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
drivers/pci/msi/msi.c: In function 'pci_msix_validate_entries':
>> drivers/pci/msi/msi.c:763:25: error: 'nvec' undeclared (first use in this function); did you mean 'nvev'?
763 | for (i = 0; i < nvec; i++) {
| ^~~~
| nvev
drivers/pci/msi/msi.c:763:25: note: each undeclared identifier is reported only once for each function it appears in
vim +763 drivers/pci/msi/msi.c
^1da177e4c3f41 drivers/pci/msi.c Linus Torvalds 2005-04-16 752
84d9651e13fb98 drivers/pci/msi/msi.c Thomas Gleixner 2023-04-10 753 static bool pci_msix_validate_entries(struct pci_dev *dev, struct msix_entry *entries, int nvev)
^1da177e4c3f41 drivers/pci/msi.c Linus Torvalds 2005-04-16 754 {
4644d22eb673f1 drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 755 bool nogap;
ded86d8d37736d drivers/pci/msi.c Eric W. Biederman 2007-01-28 756 int i, j;
^1da177e4c3f41 drivers/pci/msi.c Linus Torvalds 2005-04-16 757
bab65e48cb064d drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 758 if (!entries)
bab65e48cb064d drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 759 return true;
^1da177e4c3f41 drivers/pci/msi.c Linus Torvalds 2005-04-16 760
4644d22eb673f1 drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 761 nogap = pci_msi_domain_supports(dev, MSI_FLAG_MSIX_CONTIGUOUS, DENY_LEGACY);
4644d22eb673f1 drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 762
^1da177e4c3f41 drivers/pci/msi.c Linus Torvalds 2005-04-16 @763 for (i = 0; i < nvec; i++) {
bab65e48cb064d drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 764 /* Check for duplicate entries */
^1da177e4c3f41 drivers/pci/msi.c Linus Torvalds 2005-04-16 765 for (j = i + 1; j < nvec; j++) {
^1da177e4c3f41 drivers/pci/msi.c Linus Torvalds 2005-04-16 766 if (entries[i].entry == entries[j].entry)
bab65e48cb064d drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 767 return false;
^1da177e4c3f41 drivers/pci/msi.c Linus Torvalds 2005-04-16 768 }
4644d22eb673f1 drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 769 /* Check for unsupported gaps */
4644d22eb673f1 drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 770 if (nogap && entries[i].entry != i)
4644d22eb673f1 drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 771 return false;
^1da177e4c3f41 drivers/pci/msi.c Linus Torvalds 2005-04-16 772 }
bab65e48cb064d drivers/pci/msi/msi.c Thomas Gleixner 2022-11-11 773 return true;
3ac020e0ca8bef drivers/pci/msi.c Christoph Hellwig 2016-07-12 774 }
7bd007e480672c drivers/pci/msi.c Eric W. Biederman 2006-10-04 775
:::::: The code at line 763 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests