PCI: aardvark: Remove msi-controller dt node probing
PATCH 1/1 PCI: aardvark: Remove msi-controller dt node probing
This code assigns variables that are never used. Remove them.
--- drivers/pci/host/pci-aardvark.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/pci/host/pci-aardvark.c +0 -8
@@ -917,8 +917,6 @@ static int advk_pcie_probe(struct platform_device *pdev)struct advk_pcie *pcie;struct resource *res;struct pci_bus *bus, *child; -struct msi_controller *msi; -struct device_node *msi_node;int ret, irq; pcie =devm_kzalloc (dev,sizeof (struct advk_pcie ),GFP_KERNEL );
@@ -962,12 +960,6 @@ static int advk_pcie_probe(struct platform_device *pdev)return ret; } - msi_node =of_parse_phandle (dev->of_node,"msi-parent" ,0 ); -if (msi_node) - msi =of_pci_find_msi_chip_by_node (msi_node); -else - msi =NULL ; - bus =pci_scan_root_bus_msi (dev,0 , &advk_pcie_ops, pcie, &pcie->resources, &pcie->msi);if (!bus) {
Signature · 1 line
2.10.0.297.gf6727b0
Quoted 5 lines · Stephen Boyd
This code assigns variables that are never used. Remove them.
Reported-by Srinivas Kandagatla <[email protected]>Cc Thomas Petazzoni <[email protected]>Signed-off-by Stephen Boyd <[email protected]>
I love removing unused code! Applied to pci/host-aardvark for v4.12, thanks!
Quoted 38 lines
--- drivers/pci/host/pci-aardvark.c | 8 -------- 1 file changed, 8 deletions(-)drivers/pci/host/pci-aardvark.c +0
-8@@ -917,8 +917,6 @@ static int advk_pcie_probe(struct platform_device *pdev)struct advk_pcie *pcie;struct resource *res;struct pci_bus *bus, *child; -struct msi_controller *msi; -struct device_node *msi_node;int ret, irq; pcie =devm_kzalloc (dev,sizeof (struct advk_pcie ),GFP_KERNEL );@@ -962,12 +960,6 @@ static int advk_pcie_probe(struct platform_device *pdev)return ret; } - msi_node =of_parse_phandle (dev->of_node,"msi-parent" ,0 ); -if (msi_node) - msi =of_pci_find_msi_chip_by_node (msi_node); -else - msi =NULL ; - bus =pci_scan_root_bus_msi (dev,0 , &advk_pcie_ops, pcie, &pcie->resources, &pcie->msi);if (!bus) {Signature · 7 lines
2.10.0.297.gf6727b0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 9 lines · Bjorn Helgaas
Quoted 5 lines · Stephen Boyd
This code assigns variables that are never used. Remove them.
Reported-by Srinivas Kandagatla <[email protected]>Cc Thomas Petazzoni <[email protected]>Signed-off-by Stephen Boyd <[email protected]>I love removing unused code! Applied to pci/host-aardvark for v4.12, thanks!
Actually, I applied Thomas' series [1], which does some additional cleanup and also removes this same code. So I'll just drop this one since it's redundant. Thanks again and sorry for my confusion.
[1] https://patchwork.ozlabs.org/patch/733572/
Quoted 43 lines
Quoted 38 lines
--- drivers/pci/host/pci-aardvark.c | 8 -------- 1 file changed, 8 deletions(-)drivers/pci/host/pci-aardvark.c +0
-8@@ -917,8 +917,6 @@ static int advk_pcie_probe(struct platform_device *pdev)struct advk_pcie *pcie;struct resource *res;struct pci_bus *bus, *child; -struct msi_controller *msi; -struct device_node *msi_node;int ret, irq; pcie =devm_kzalloc (dev,sizeof (struct advk_pcie ),GFP_KERNEL );@@ -962,12 +960,6 @@ static int advk_pcie_probe(struct platform_device *pdev)return ret; } - msi_node =of_parse_phandle (dev->of_node,"msi-parent" ,0 ); -if (msi_node) - msi =of_pci_find_msi_chip_by_node (msi_node); -else - msi =NULL ; - bus =pci_scan_root_bus_msi (dev,0 , &advk_pcie_ops, pcie, &pcie->resources, &pcie->msi);if (!bus) {Signature · 7 lines
2.10.0.297.gf6727b0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hello,
Quoted 9 lines · Bjorn Helgaas
Quoted 5 lines · Stephen Boyd
This code assigns variables that are never used. Remove them.
Reported-by Srinivas Kandagatla <[email protected]>Cc Thomas Petazzoni <[email protected]>Signed-off-by Stephen Boyd <[email protected]>I love removing unused code! Applied to pci/host-aardvark for v4.12, thanks!
Why? I have already sent a patch that also does this (and much more!) a number of times already, and it has never been applied. See:
[PATCH v3 1/3] pci: pci-aardvark: move to MSI handling using generic MSI support
v1 on September 1st, 2016
v2 on December 23th, 2016
v3 on February 28th, 2017
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com