[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-pci
Subject: [PATCH] PCI/MSI: provide dummy pci_msix_can_alloc_dyn() helper
From: Arnd Bergmann <arnd () kernel ! org>
Date: 2023-03-31 7:55:04
Message-ID: 20230331075528.1300270-1-arnd () kernel ! org
[Download RAW message or body]
From: Arnd Bergmann <arnd@arndb.de>
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@arndb.de>
---
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic