[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230331075528.1300270-1-arnd@kernel.org>
Date: Fri, 31 Mar 2023 09:55:04 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Bjorn Helgaas <bhelgaas@...gle.com>,
Saeed Mahameed <saeedm@...dia.com>
Cc: Arnd Bergmann <arnd@...db.de>,
Thomas Gleixner <tglx@...utronix.de>,
Dan Williams <dan.j.williams@...el.com>,
Marc Zyngier <maz@...nel.org>,
Kevin Tian <kevin.tian@...el.com>,
Ira Weiny <ira.weiny@...el.com>, Shay Drory <shayd@...dia.com>,
Jacob Keller <jacob.e.keller@...el.com>,
Eli Cohen <elic@...dia.com>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] PCI/MSI: provide dummy pci_msix_can_alloc_dyn() helper
From: Arnd Bergmann <arnd@...db.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@...db.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
Powered by blists - more mailing lists