Skip to content

Commit 05f66cf

Browse files
fbqbjorn-helgaas
authored andcommitted
PCI: Provide pci_free_irq_vectors() stub
473b9f3 ("rust: pci: fix build failure when CONFIG_PCI_MSI is disabled") fixed a build error by providing Rust helpers when CONFIG_PCI_MSI is not set. However the Rust helpers rely on pci_free_irq_vectors(), which is only available when CONFIG_PCI=y. When CONFIG_PCI is not set, there is already a stub for pci_alloc_irq_vectors(). Add a similar stub for pci_free_irq_vectors(). Fixes: 473b9f3 ("rust: pci: fix build failure when CONFIG_PCI_MSI is disabled") Reported-by: FUJITA Tomonori <fujita.tomonori@gmail.com> Closes: https://lore.kernel.org/rust-for-linux/20251209014312.575940-1-fujita.tomonori@gmail.com/ Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202512220740.4Kexm4dW-lkp@intel.com/ Reported-by: Liang Jie <liangjie@lixiang.com> Closes: https://lore.kernel.org/rust-for-linux/20251222034415.1384223-1-buaajxlj@163.com/ Signed-off-by: Boqun Feng <boqun.feng@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Drew Fustini <fustini@kernel.org> Reviewed-by: David Gow <davidgow@google.com> Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com> Reviewed-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20251226113938.52145-1-boqun.feng@gmail.com
1 parent 8f0b4cc commit 05f66cf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

include/linux/pci.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,6 +2210,10 @@ pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
22102210
{
22112211
return -ENOSPC;
22122212
}
2213+
2214+
static inline void pci_free_irq_vectors(struct pci_dev *dev)
2215+
{
2216+
}
22132217
#endif /* CONFIG_PCI */
22142218

22152219
/* Include architecture-dependent settings and functions */

0 commit comments

Comments
 (0)