Skip to contentSkip to conversation

PCI/MSI: Remove unused interfaces

PATCH In review Bjorn Helgaas 1 participant 4 messages Mar 25, 2019 – Mar 27, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover PCI/MSI: Remove unused interfaces

From: Bjorn Helgaas <[email protected]>

pcie-xilinx-nwl.c is the only driver to use mask_msi_irq() and unmask_msi_irq(), which are trivial wrappers around PCI-specific functions. We obviously know we need the PCI versions in this driver, so use them directly, as all the other PCI host controller drivers do, and remove the unused wrappers.

Unless there's objection, I'll merge both of these via my tree just to keep them together.

Bjorn Helgaas (2):
PCI/MSI: Remove unused __write_msi_msg() and write_msi_msg() PCI/MSI: Remove unused mask_msi_irq() and unmask_msi_irq()

 drivers/pci/controller/pcie-xilinx-nwl.c |  9 ++++-----
 include/linux/msi.h                      | 18 ------------------
 2 files changed, 4 insertions(+), 23 deletions(-)
Signature · 1 line
2.21.0.392.gf8f6787159e-goog
#1 lore raw

PATCH 1/2 PCI/MSI: Remove unused __write_msi_msg() and write_msi_msg()

From: Bjorn Helgaas <[email protected]>

Remove unused __write_msi_msg() and write_msi_msg().

These were added by 83a18912b0e8 ("PCI/MSI: Rename write_msi_msg() to pci_write_msi_msg()"), they served their purpose, and they're no longer needed.

CC Jiang Liu <[email protected]> # 83a18912b0e8 author
---
 include/linux/msi.h | 9 ---------
 1 file changed, 9 deletions(-)
include/linux/msi.h +0 -9
index 7e9b81c3b50d..f934982a0e68 100644
@@ -148,15 +148,6 @@ u32 __pci_msi_desc_mask_irq(struct msi_desc *desc, u32 mask, u32 flag);
 void pci_msi_mask_irq(struct irq_data *data);
 void pci_msi_unmask_irq(struct irq_data *data);
 
-/* Conversion helpers. Should be removed after merging */
-static inline void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg)
-{
-	__pci_write_msi_msg(entry, msg);
-}
-static inline void write_msi_msg(int irq, struct msi_msg *msg)
-{
-	pci_write_msi_msg(irq, msg);
-}
 static inline void mask_msi_irq(struct irq_data *data)
 {
 	pci_msi_mask_irq(data);
Signature · 1 line
2.21.0.392.gf8f6787159e-goog
#2 lore raw

PATCH 2/2 PCI/MSI: Remove unused mask_msi_irq() and unmask_msi_irq()

In reply to Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

Change pcie-xilinx-nwl.c to use pci_msi_mask_irq() and pci_msi_unmask_irq() like all other PCI host controller drivers. Remove the now-unused mask_msi_irq() and unmask_msi_irq().

---
 drivers/pci/controller/pcie-xilinx-nwl.c | 9 ++++-----
 include/linux/msi.h                      | 9 ---------
 2 files changed, 4 insertions(+), 14 deletions(-)
drivers/pci/controller/pcie-xilinx-nwl.c +4 -5
index 81538d77f790..3b031f00a94a 100644
@@ -438,11 +438,10 @@ static const struct irq_domain_ops legacy_domain_ops = {
 #ifdef CONFIG_PCI_MSI
 static struct irq_chip nwl_msi_irq_chip = {
 	.name = "nwl_pcie:msi",
-	.irq_enable = unmask_msi_irq,
-	.irq_disable = mask_msi_irq,
-	.irq_mask = mask_msi_irq,
-	.irq_unmask = unmask_msi_irq,
-
+	.irq_enable = pci_msi_unmask_irq,
+	.irq_disable = pci_msi_mask_irq,
+	.irq_mask = pci_msi_mask_irq,
+	.irq_unmask = pci_msi_unmask_irq,
 };
 
 static struct msi_domain_info nwl_msi_domain_info = {
include/linux/msi.h +0 -9
index f934982a0e68..052f04fcf953 100644
@@ -148,15 +148,6 @@ u32 __pci_msi_desc_mask_irq(struct msi_desc *desc, u32 mask, u32 flag);
 void pci_msi_mask_irq(struct irq_data *data);
 void pci_msi_unmask_irq(struct irq_data *data);
 
-static inline void mask_msi_irq(struct irq_data *data)
-{
-	pci_msi_mask_irq(data);
-}
-static inline void unmask_msi_irq(struct irq_data *data)
-{
-	pci_msi_unmask_irq(data);
-}
-
 /*
  * The arch hooks to setup up msi irqs. Those functions are
  * implemented as weak symbols so that they /can/ be overriden by
Signature · 1 line
2.21.0.392.gf8f6787159e-goog
#3 lore raw
In reply to Bjorn Helgaas

[+cc Lorenzo, Michal, linux-arm-kernel]

Quoted 10 lines · Bjorn Helgaas

From: Bjorn Helgaas <[email protected]>

pcie-xilinx-nwl.c is the only driver to use mask_msi_irq() and unmask_msi_irq(), which are trivial wrappers around PCI-specific functions. We obviously know we need the PCI versions in this driver, so use them directly, as all the other PCI host controller drivers do, and remove the unused wrappers.

Unless there's objection, I'll merge both of these via my tree just to keep them together.

These are on pci/msi for v5.2.

Quoted 11 lines

Bjorn Helgaas (2):
PCI/MSI: Remove unused __write_msi_msg() and write_msi_msg() PCI/MSI: Remove unused mask_msi_irq() and unmask_msi_irq()

 drivers/pci/controller/pcie-xilinx-nwl.c |  9 ++++-----
 include/linux/msi.h                      | 18 ------------------
 2 files changed, 4 insertions(+), 23 deletions(-)
Signature · 1 line
2.21.0.392.gf8f6787159e-goog