* [PATCH] PCI/MSI: provide dummy pci_msix_can_alloc_dyn() helper
@ 2023-03-31 7:55 Arnd Bergmann
0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2023-03-31 7:55 UTC (permalink / raw)
To: Bjorn Helgaas, Saeed Mahameed
Cc: Arnd Bergmann, Thomas Gleixner, Dan Williams, Marc Zyngier,
Kevin Tian, Ira Weiny, Shay Drory, Jacob Keller, Eli Cohen,
linux-pci, linux-kernel
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-31 7:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-31 7:55 [PATCH] PCI/MSI: provide dummy pci_msix_can_alloc_dyn() helper Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).