PCI/MSI: provide dummy pci_msix_can_alloc_dyn() helper
PATCH 1/1 PCI/MSI: provide dummy pci_msix_can_alloc_dyn() helper
From: Arnd Bergmann <[email protected]>
A change in mlx5 caused a build failure when PCI_MSI is disabled:
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c: In function 'irq_release':drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:148:31: error: implicit declaration of function 'pci_msix_can_alloc_dyn' [-Werror=implicit-function-declaration]
148 | if (irq->map.index && pci_msix_can_alloc_dyn(pool->dev->pdev))
| ^~~~~~~~~~~~~~~~~~~~~~
All the related functions already have a dummy version that does nothing in this configuration, but pci_msix_can_alloc_dyn() does not, so add one.
Fixes fb0a6a268dcd ("net/mlx5: Provide external API for allocating vectors")
Fixes 34026364df8e ("PCI/MSI: Provide post-enable dynamic allocation interfaces for MSI-X")
Signed-off-by Arnd Bergmann <[email protected]>
--- include/linux/pci.h | 5 +++++ 1 file changed, 5 insertions(+)
include/linux/pci.h +5 -0
@@ -1624,6 +1624,11 @@ pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs, flags, NULL); } +static inline bool pci_msix_can_alloc_dyn (struct pci_dev *dev) +{ +return false; +} +static inline struct msi_map pci_msix_alloc_irq_at (struct pci_dev *dev,unsigned int index,const struct irq_affinity_desc *affdesc) {
Signature · 1 line
2.39.2