[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202202162105.kmic72fi-lkp@intel.com>
Date: Wed, 16 Feb 2022 21:37:11 +0800
From: kernel test robot <lkp@...el.com>
To: Zhu Lingshan <lingshan.zhu@...el.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [ls-zhu:shared_irq_v4 3/3] drivers/vdpa/ifcvf/ifcvf_main.c:94:13:
warning: variable 'max_intr' set but not used
tree: https://github.com/ls-zhu/linux shared_irq_v4
head: 25e932e005734a4b8924e41bbedafa9dd394aead
commit: 25e932e005734a4b8924e41bbedafa9dd394aead [3/3] vDPA/ifcvf: implement device MSIX vector allocator
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20220216/202202162105.kmic72fi-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 11.2.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://github.com/ls-zhu/linux/commit/25e932e005734a4b8924e41bbedafa9dd394aead
git remote add ls-zhu https://github.com/ls-zhu/linux
git fetch --no-tags ls-zhu shared_irq_v4
git checkout 25e932e005734a4b8924e41bbedafa9dd394aead
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/vdpa/ifcvf/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/vdpa/ifcvf/ifcvf_main.c: In function 'ifcvf_request_irq':
>> drivers/vdpa/ifcvf/ifcvf_main.c:94:13: warning: variable 'max_intr' set but not used [-Wunused-but-set-variable]
94 | u16 max_intr;
| ^~~~~~~~
vim +/max_intr +94 drivers/vdpa/ifcvf/ifcvf_main.c
88
89 static int ifcvf_request_irq(struct ifcvf_adapter *adapter)
90 {
91 struct pci_dev *pdev = adapter->pdev;
92 struct ifcvf_hw *vf = &adapter->vf;
93 int vector, nvectors, i, ret, irq;
> 94 u16 max_intr;
95
96 nvectors = ifcvf_alloc_vectors(adapter);
97 if (nvectors <=0)
98 return nvectors;
99
100 max_intr = vf->nr_vring + 1;
101 snprintf(vf->config_msix_name, 256, "ifcvf[%s]-config\n",
102 pci_name(pdev));
103 vector = 0;
104 vf->config_irq = pci_irq_vector(pdev, vector);
105 ret = devm_request_irq(&pdev->dev, vf->config_irq,
106 ifcvf_config_changed, 0,
107 vf->config_msix_name, vf);
108 if (ret) {
109 IFCVF_ERR(pdev, "Failed to request config irq\n");
110 return ret;
111 }
112
113 for (i = 0; i < vf->nr_vring; i++) {
114 snprintf(vf->vring[i].msix_name, 256, "ifcvf[%s]-%d\n",
115 pci_name(pdev), i);
116 vector = i + IFCVF_MSI_QUEUE_OFF;
117 irq = pci_irq_vector(pdev, vector);
118 ret = devm_request_irq(&pdev->dev, irq,
119 ifcvf_intr_handler, 0,
120 vf->vring[i].msix_name,
121 &vf->vring[i]);
122 if (ret) {
123 IFCVF_ERR(pdev,
124 "Failed to request irq for vq %d\n", i);
125 ifcvf_free_irq(adapter, i);
126
127 return ret;
128 }
129
130 vf->vring[i].irq = irq;
131 }
132
133 return 0;
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists