Skip to content

Commit 195d8e5

Browse files
rchatrebjorn-helgaas
authored andcommitted
PCI/MSI: Provide missing stub for pci_msix_can_alloc_dyn()
pci_msix_can_alloc_dyn() is not declared when CONFIG_PCI_MSI is disabled. There is no existing user of pci_msix_can_alloc_dyn() but work is in progress to change this. This work encounters the following error when CONFIG_PCI_MSI is disabled: drivers/vfio/pci/vfio_pci_intrs.c:427:21: error: implicit declaration of function 'pci_msix_can_alloc_dyn' [-Werror=implicit-function-declaration] Provide definition for pci_msix_can_alloc_dyn() in preparation for users that need to compile when CONFIG_PCI_MSI is disabled. [bhelgaas: Also reported by Arnd Bergmann <[email protected]> in drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c; added his Fixes: line] Fixes: fb0a6a2 ("net/mlx5: Provide external API for allocating vectors") Fixes: 3402636 ("PCI/MSI: Provide post-enable dynamic allocation interfaces for MSI-X") Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Link: https://lore.kernel.org/r/310ecc4815dae4174031062f525245f0755c70e2.1680119924.git.reinette.chatre@intel.com Reported-by: kernel test robot <[email protected]> Signed-off-by: Reinette Chatre <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Cc: [email protected] # v6.2+
1 parent fe15c26 commit 195d8e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/pci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,6 +1623,8 @@ pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
16231623
flags, NULL);
16241624
}
16251625

1626+
static inline bool pci_msix_can_alloc_dyn(struct pci_dev *dev)
1627+
{ return false; }
16261628
static inline struct msi_map pci_msix_alloc_irq_at(struct pci_dev *dev, unsigned int index,
16271629
const struct irq_affinity_desc *affdesc)
16281630
{

0 commit comments

Comments
 (0)