linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI: aardvark: Remove msi-controller dt node probing
@ 2017-03-14 19:08 Stephen Boyd
  2017-03-14 19:30 ` Bjorn Helgaas
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Boyd @ 2017-03-14 19:08 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Thomas Petazzoni, linux-pci, Srinivas Kandagatla, linux-kernel,
	linux-arm-kernel

This code assigns variables that are never used. Remove them.

Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
---
 drivers/pci/host/pci-aardvark.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
index 4fce494271cc..56e1aead65fc 100644
--- a/drivers/pci/host/pci-aardvark.c
+++ b/drivers/pci/host/pci-aardvark.c
@@ -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) {
-- 
2.10.0.297.gf6727b0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] PCI: aardvark: Remove msi-controller dt node probing
  2017-03-14 19:08 [PATCH] PCI: aardvark: Remove msi-controller dt node probing Stephen Boyd
@ 2017-03-14 19:30 ` Bjorn Helgaas
  2017-03-14 20:17   ` Bjorn Helgaas
  2017-03-14 20:27   ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2017-03-14 19:30 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Thomas Petazzoni, linux-pci, linux-kernel, Srinivas Kandagatla,
	Bjorn Helgaas, linux-arm-kernel

On Tue, Mar 14, 2017 at 12:08:51PM -0700, Stephen Boyd wrote:
> This code assigns variables that are never used. Remove them.
> 
> Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>

I love removing unused code!  Applied to pci/host-aardvark for v4.12,
thanks!

> ---
>  drivers/pci/host/pci-aardvark.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
> index 4fce494271cc..56e1aead65fc 100644
> --- a/drivers/pci/host/pci-aardvark.c
> +++ b/drivers/pci/host/pci-aardvark.c
> @@ -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) {
> -- 
> 2.10.0.297.gf6727b0
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] PCI: aardvark: Remove msi-controller dt node probing
  2017-03-14 19:30 ` Bjorn Helgaas
@ 2017-03-14 20:17   ` Bjorn Helgaas
  2017-03-14 20:27   ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2017-03-14 20:17 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Thomas Petazzoni, linux-pci, linux-kernel, Srinivas Kandagatla,
	Bjorn Helgaas, linux-arm-kernel

On Tue, Mar 14, 2017 at 02:30:05PM -0500, Bjorn Helgaas wrote:
> On Tue, Mar 14, 2017 at 12:08:51PM -0700, Stephen Boyd wrote:
> > This code assigns variables that are never used. Remove them.
> > 
> > Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
> 
> 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/

> > ---
> >  drivers/pci/host/pci-aardvark.c | 8 --------
> >  1 file changed, 8 deletions(-)
> > 
> > diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c
> > index 4fce494271cc..56e1aead65fc 100644
> > --- a/drivers/pci/host/pci-aardvark.c
> > +++ b/drivers/pci/host/pci-aardvark.c
> > @@ -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) {
> > -- 
> > 2.10.0.297.gf6727b0
> > 
> > 
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] PCI: aardvark: Remove msi-controller dt node probing
  2017-03-14 19:30 ` Bjorn Helgaas
  2017-03-14 20:17   ` Bjorn Helgaas
@ 2017-03-14 20:27   ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2017-03-14 20:27 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: Stephen Boyd, Bjorn Helgaas, linux-pci, Srinivas Kandagatla,
	linux-kernel, linux-arm-kernel

Hello,

On Tue, 14 Mar 2017 14:30:05 -0500, Bjorn Helgaas wrote:
> On Tue, Mar 14, 2017 at 12:08:51PM -0700, Stephen Boyd wrote:
> > This code assigns variables that are never used. Remove them.
> > 
> > Reported-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> > Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>  
> 
> 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

-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-14 20:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-14 19:08 [PATCH] PCI: aardvark: Remove msi-controller dt node probing Stephen Boyd
2017-03-14 19:30 ` Bjorn Helgaas
2017-03-14 20:17   ` Bjorn Helgaas
2017-03-14 20:27   ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).