diff mbox

[1/2] PCI/msi: remove unused function pci_msi_create_default_irq_domain

Message ID 20170203162705.5182-2-hch@lst.de
State Superseded
Headers show

Commit Message

Christoph Hellwig Feb. 3, 2017, 4:27 p.m. UTC
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/pci/msi.c   | 27 ---------------------------
 include/linux/msi.h |  3 ---
 2 files changed, 30 deletions(-)

Comments

Thomas Gleixner Feb. 8, 2017, 1:43 p.m. UTC | #1
On Fri, 3 Feb 2017, Christoph Hellwig wrote:

No objections, but then we also can remove:

struct irq_domain * __weak arch_get_pci_msi_domain(struct pci_dev *dev)

as there are no arch specific implementations

along with:

static struct irq_domain *pci_msi_default_domain;

because pci_msi_create_default_irq_domain() is the only place where the
default domain is ever set.

Thanks,

	tglx
Marc Zyngier Feb. 9, 2017, 8:53 a.m. UTC | #2
On 08/02/17 13:43, Thomas Gleixner wrote:
> On Fri, 3 Feb 2017, Christoph Hellwig wrote:
> 
> No objections, but then we also can remove:
> 
> struct irq_domain * __weak arch_get_pci_msi_domain(struct pci_dev *dev)
> 
> as there are no arch specific implementations
> 
> along with:
> 
> static struct irq_domain *pci_msi_default_domain;
> 
> because pci_msi_create_default_irq_domain() is the only place where the
> default domain is ever set.

Indeed. I'm all for dropping the "default" stuff, as it only gives
people the idea that they can get away with it (most of the time, they
cannot).

Thanks,

	M.
diff mbox

Patch

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 50c5003295ca..4f2996bd5c6a 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1507,33 +1507,6 @@  void pci_msi_domain_free_irqs(struct irq_domain *domain, struct pci_dev *dev)
 	msi_domain_free_irqs(domain, &dev->dev);
 }
 
-/**
- * pci_msi_create_default_irq_domain - Create a default MSI interrupt domain
- * @fwnode:	Optional fwnode of the interrupt controller
- * @info:	MSI domain info
- * @parent:	Parent irq domain
- *
- * Returns: A domain pointer or NULL in case of failure. If successful
- * the default PCI/MSI irqdomain pointer is updated.
- */
-struct irq_domain *pci_msi_create_default_irq_domain(struct fwnode_handle *fwnode,
-		struct msi_domain_info *info, struct irq_domain *parent)
-{
-	struct irq_domain *domain;
-
-	mutex_lock(&pci_msi_domain_lock);
-	if (pci_msi_default_domain) {
-		pr_err("PCI: default irq domain for PCI MSI has already been created.\n");
-		domain = NULL;
-	} else {
-		domain = pci_msi_create_irq_domain(fwnode, info, parent);
-		pci_msi_default_domain = domain;
-	}
-	mutex_unlock(&pci_msi_domain_lock);
-
-	return domain;
-}
-
 static int get_msi_id_cb(struct pci_dev *pdev, u16 alias, void *data)
 {
 	u32 *pa = data;
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 0db320b7bb15..18b8566b3ce3 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -319,9 +319,6 @@  struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode,
 int pci_msi_domain_alloc_irqs(struct irq_domain *domain, struct pci_dev *dev,
 			      int nvec, int type);
 void pci_msi_domain_free_irqs(struct irq_domain *domain, struct pci_dev *dev);
-struct irq_domain *pci_msi_create_default_irq_domain(struct fwnode_handle *fwnode,
-		 struct msi_domain_info *info, struct irq_domain *parent);
-
 irq_hw_number_t pci_msi_domain_calc_hwirq(struct pci_dev *dev,
 					  struct msi_desc *desc);
 int pci_msi_domain_check_cap(struct irq_domain *domain,