diff mbox

[1/1] PCI/MSI: X-Gene: Remove msi_controller assignment in X-Gene PCIe driver

Message ID 1442449900-30842-1-git-send-email-dhdang@apm.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Duc Dang Sept. 17, 2015, 12:31 a.m. UTC
With commit 8d63bc7beaee ("PCI/MSI: pci-xgene-msi: Get rid of
struct msi_controller"), it is no longer required to assign
msi_controller for X-Gene PCIe host bridge to support MSI. This
patch removes this unnecessary code and also helps avoid a warning
message ("failed to enable MSI") during boot.

Signed-off-by: Duc Dang <dhdang@apm.com>
Cc: Tanmay Inamdar <tinamdar@apm.com>
---
 drivers/pci/host/pci-xgene.c | 22 ----------------------
 1 file changed, 22 deletions(-)

Comments

Marc Zyngier Sept. 18, 2015, 8:59 a.m. UTC | #1
On Wed, 16 Sep 2015 17:31:40 -0700
Duc Dang <dhdang@apm.com> wrote:

> With commit 8d63bc7beaee ("PCI/MSI: pci-xgene-msi: Get rid of
> struct msi_controller"), it is no longer required to assign
> msi_controller for X-Gene PCIe host bridge to support MSI. This
> patch removes this unnecessary code and also helps avoid a warning
> message ("failed to enable MSI") during boot.
> 
> Signed-off-by: Duc Dang <dhdang@apm.com>
> Cc: Tanmay Inamdar <tinamdar@apm.com>

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

	M.
Duc Dang Sept. 18, 2015, 5:22 p.m. UTC | #2
On Fri, Sep 18, 2015 at 1:59 AM, Marc Zyngier <marc.zyngier@arm.com> wrote:
> On Wed, 16 Sep 2015 17:31:40 -0700
> Duc Dang <dhdang@apm.com> wrote:
>
>> With commit 8d63bc7beaee ("PCI/MSI: pci-xgene-msi: Get rid of
>> struct msi_controller"), it is no longer required to assign
>> msi_controller for X-Gene PCIe host bridge to support MSI. This
>> patch removes this unnecessary code and also helps avoid a warning
>> message ("failed to enable MSI") during boot.
>>
>> Signed-off-by: Duc Dang <dhdang@apm.com>
>> Cc: Tanmay Inamdar <tinamdar@apm.com>
>
> Acked-by: Marc Zyngier <marc.zyngier@arm.com>

Thanks, Marc.

>
>         M.
> --
> Jazz is not dead. It just smells funny.
Bjorn Helgaas Sept. 25, 2015, 11:34 p.m. UTC | #3
On Fri, Sep 18, 2015 at 09:59:56AM +0100, Marc Zyngier wrote:
> On Wed, 16 Sep 2015 17:31:40 -0700
> Duc Dang <dhdang@apm.com> wrote:
> 
> > With commit 8d63bc7beaee ("PCI/MSI: pci-xgene-msi: Get rid of
> > struct msi_controller"), it is no longer required to assign
> > msi_controller for X-Gene PCIe host bridge to support MSI. This
> > patch removes this unnecessary code and also helps avoid a warning
> > message ("failed to enable MSI") during boot.
> > 
> > Signed-off-by: Duc Dang <dhdang@apm.com>
> > Cc: Tanmay Inamdar <tinamdar@apm.com>
> 
> Acked-by: Marc Zyngier <marc.zyngier@arm.com>

I lost the original mail from Duc, but I applied this to pci/host-xgene for
v4.4 with this changelog:

commit 00b9b91cb330e70b6bc571a9aa7175b4590ca452
Author: Duc Dang <dhdang@apm.com>
Date:   Wed Sep 16 17:31:40 2015 -0700

    PCI/MSI: xgene: Remove msi_controller assignment
    
    After 8d63bc7beaee ("PCI/MSI: pci-xgene-msi: Get rid of struct
    msi_controller"), it is no longer required to assign msi_controller for
    X-Gene PCIe host bridge to support MSI.
    
    Remove this unnecessary code.  This also avoids a warning message ("failed
    to enable MSI") during boot.
    
    [bhelgaas: changelog]
    Signed-off-by: Duc Dang <dhdang@apm.com>
    Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
    Acked-by: Marc Zyngier <marc.zyngier@arm.com>
    Cc: Tanmay Inamdar <tinamdar@apm.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/pci/host/pci-xgene.c b/drivers/pci/host/pci-xgene.c
index 0236ab9..ae00ce2 100644
--- a/drivers/pci/host/pci-xgene.c
+++ b/drivers/pci/host/pci-xgene.c
@@ -509,24 +509,6 @@  static int xgene_pcie_setup(struct xgene_pcie_port *port,
 	return 0;
 }
 
-static int xgene_pcie_msi_enable(struct pci_bus *bus)
-{
-	struct device_node *msi_node;
-
-	msi_node = of_parse_phandle(bus->dev.of_node,
-					"msi-parent", 0);
-	if (!msi_node)
-		return -ENODEV;
-
-	bus->msi = of_pci_find_msi_chip_by_node(msi_node);
-	if (!bus->msi)
-		return -ENODEV;
-
-	of_node_put(msi_node);
-	bus->msi->dev = &bus->dev;
-	return 0;
-}
-
 static int xgene_pcie_probe_bridge(struct platform_device *pdev)
 {
 	struct device_node *dn = pdev->dev.of_node;
@@ -567,10 +549,6 @@  static int xgene_pcie_probe_bridge(struct platform_device *pdev)
 	if (!bus)
 		return -ENOMEM;
 
-	if (IS_ENABLED(CONFIG_PCI_MSI))
-		if (xgene_pcie_msi_enable(bus))
-			dev_info(port->dev, "failed to enable MSI\n");
-
 	pci_scan_child_bus(bus);
 	pci_assign_unassigned_bus_resources(bus);
 	pci_bus_add_devices(bus);