* [westeri-thunderbolt:next 7/7] drivers/thunderbolt/pci.c:115:24: warning: unused variable 'dev'
@ 2026-07-27 16:42 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-07-27 16:42 UTC (permalink / raw)
To: Pan Chuang; +Cc: oe-kbuild-all, linux-usb, Mika Westerberg
tree: https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git next
head: eef9f6d8c36f7610b5f837e196692ec34842a400
commit: eef9f6d8c36f7610b5f837e196692ec34842a400 [7/7] thunderbolt: Remove redundant dev_err_probe()
config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20260727/202607271811.1izFG7s9-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260727/202607271811.1izFG7s9-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/202607271811.1izFG7s9-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/thunderbolt/pci.c: In function 'nhi_pci_init_msi':
>> drivers/thunderbolt/pci.c:115:24: warning: unused variable 'dev' [-Wunused-variable]
115 | struct device *dev = &pdev->dev;
| ^~~
vim +/dev +115 drivers/thunderbolt/pci.c
e241d98e04ef05 Konrad Dybcio 2026-05-21 110
e241d98e04ef05 Konrad Dybcio 2026-05-21 111 static int nhi_pci_init_msi(struct tb_nhi *nhi)
e241d98e04ef05 Konrad Dybcio 2026-05-21 112 {
e241d98e04ef05 Konrad Dybcio 2026-05-21 113 struct tb_nhi_pci *nhi_pci = nhi_to_pci(nhi);
e241d98e04ef05 Konrad Dybcio 2026-05-21 114 struct pci_dev *pdev = to_pci_dev(nhi->dev);
e241d98e04ef05 Konrad Dybcio 2026-05-21 @115 struct device *dev = &pdev->dev;
e241d98e04ef05 Konrad Dybcio 2026-05-21 116 int res, irq, nvec;
e241d98e04ef05 Konrad Dybcio 2026-05-21 117
e241d98e04ef05 Konrad Dybcio 2026-05-21 118 ida_init(&nhi_pci->msix_ida);
e241d98e04ef05 Konrad Dybcio 2026-05-21 119
e241d98e04ef05 Konrad Dybcio 2026-05-21 120 /*
e241d98e04ef05 Konrad Dybcio 2026-05-21 121 * The NHI has 16 MSI-X vectors or a single MSI. We first try to
e241d98e04ef05 Konrad Dybcio 2026-05-21 122 * get all MSI-X vectors and if we succeed, each ring will have
e241d98e04ef05 Konrad Dybcio 2026-05-21 123 * one MSI-X. If for some reason that does not work out, we
e241d98e04ef05 Konrad Dybcio 2026-05-21 124 * fallback to a single MSI.
e241d98e04ef05 Konrad Dybcio 2026-05-21 125 */
e241d98e04ef05 Konrad Dybcio 2026-05-21 126 nvec = pci_alloc_irq_vectors(pdev, MSIX_MIN_VECS, MSIX_MAX_VECS,
e241d98e04ef05 Konrad Dybcio 2026-05-21 127 PCI_IRQ_MSIX);
e241d98e04ef05 Konrad Dybcio 2026-05-21 128 if (nvec < 0) {
e241d98e04ef05 Konrad Dybcio 2026-05-21 129 nvec = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
e241d98e04ef05 Konrad Dybcio 2026-05-21 130 if (nvec < 0)
e241d98e04ef05 Konrad Dybcio 2026-05-21 131 return nvec;
e241d98e04ef05 Konrad Dybcio 2026-05-21 132
e241d98e04ef05 Konrad Dybcio 2026-05-21 133 INIT_WORK(&nhi->interrupt_work, nhi_interrupt_work);
e241d98e04ef05 Konrad Dybcio 2026-05-21 134
e241d98e04ef05 Konrad Dybcio 2026-05-21 135 irq = pci_irq_vector(pdev, 0);
e241d98e04ef05 Konrad Dybcio 2026-05-21 136 if (irq < 0)
e241d98e04ef05 Konrad Dybcio 2026-05-21 137 return irq;
e241d98e04ef05 Konrad Dybcio 2026-05-21 138
e241d98e04ef05 Konrad Dybcio 2026-05-21 139 res = devm_request_irq(&pdev->dev, irq, nhi_msi,
e241d98e04ef05 Konrad Dybcio 2026-05-21 140 IRQF_NO_SUSPEND, "thunderbolt", nhi);
e241d98e04ef05 Konrad Dybcio 2026-05-21 141 if (res)
eef9f6d8c36f76 Pan Chuang 2026-07-16 142 return res;
e241d98e04ef05 Konrad Dybcio 2026-05-21 143 }
e241d98e04ef05 Konrad Dybcio 2026-05-21 144
e241d98e04ef05 Konrad Dybcio 2026-05-21 145 return 0;
e241d98e04ef05 Konrad Dybcio 2026-05-21 146 }
e241d98e04ef05 Konrad Dybcio 2026-05-21 147
:::::: The code at line 115 was first introduced by commit
:::::: e241d98e04ef0513b78de2d87d8d1eb2993d9d34 thunderbolt: Separate out common NHI bits
:::::: TO: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
:::::: CC: Mika Westerberg <mika.westerberg@linux.intel.com>
--
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:[~2026-07-27 16:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-27 16:42 [westeri-thunderbolt:next 7/7] drivers/thunderbolt/pci.c:115:24: warning: unused variable 'dev' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox