[arm-platforms:irq/domain_cleanup 30/39] drivers/pci/controller/pci-tegra.c:1559:8: warning: variable 'ret' is uninitialized when used here

kernel test robot lkp at intel.com
Mon May 17 11:21:51 PDT 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git irq/domain_cleanup
head:   0175d864077c1900b27ffb2d1aff4f736548e711
commit: 7c8327614b2e21be95b1a486f93d907aed885557 [30/39] PCI: Bulk conversion to generic_handle_domain_irq()
config: arm64-randconfig-r004-20210517 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 0a34ff8bcb1df16fe7d643ccbe4567b2162c5024)
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
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/commit/?id=7c8327614b2e21be95b1a486f93d907aed885557
        git remote add arm-platforms https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git
        git fetch --no-tags arm-platforms irq/domain_cleanup
        git checkout 7c8327614b2e21be95b1a486f93d907aed885557
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=arm64 

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

All warnings (new ones prefixed by >>):

>> drivers/pci/controller/pci-tegra.c:1559:8: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
                           if (ret) {
                               ^~~
   drivers/pci/controller/pci-tegra.c:1556:11: note: initialize the variable 'ret' to silence this warning
                           int ret;
                                  ^
                                   = 0
   1 warning generated.


vim +/ret +1559 drivers/pci/controller/pci-tegra.c

  1539	
  1540	static void tegra_pcie_msi_irq(struct irq_desc *desc)
  1541	{
  1542		struct tegra_pcie *pcie = irq_desc_get_handler_data(desc);
  1543		struct irq_chip *chip = irq_desc_get_chip(desc);
  1544		struct tegra_msi *msi = &pcie->msi;
  1545		struct device *dev = pcie->dev;
  1546		unsigned int i;
  1547	
  1548		chained_irq_enter(chip, desc);
  1549	
  1550		for (i = 0; i < 8; i++) {
  1551			unsigned long reg = afi_readl(pcie, AFI_MSI_VEC(i));
  1552	
  1553			while (reg) {
  1554				unsigned int offset = find_first_bit(&reg, 32);
  1555				unsigned int index = i * 32 + offset;
  1556				int ret;
  1557	
  1558				generic_handle_domain_irq(msi->domain->parent, index);
> 1559				if (ret) {
  1560					/*
  1561					 * that's weird who triggered this?
  1562					 * just clear it
  1563					 */
  1564					dev_info(dev, "unexpected MSI\n");
  1565					afi_writel(pcie, BIT(index % 32), AFI_MSI_VEC(index));
  1566				}
  1567	
  1568				/* see if there's any more pending in this vector */
  1569				reg = afi_readl(pcie, AFI_MSI_VEC(i));
  1570			}
  1571		}
  1572	
  1573		chained_irq_exit(chip, desc);
  1574	}
  1575	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 35608 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20210518/0def3624/attachment-0001.gz>


More information about the linux-arm-kernel mailing list