[PATCH] PCI/MSI: provide dummy pci_msix_can_alloc_dyn() helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Arnd Bergmann <arnd@xxxxxxxx>

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 <arnd@xxxxxxxx>
---
 include/linux/pci.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index b50e5c79f7e3..f69f7939331e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -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)
 {
-- 
2.39.2




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux