* [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning @ 2017-06-21 21:52 Arnd Bergmann 2017-06-21 21:53 ` [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again Arnd Bergmann ` (4 more replies) 0 siblings, 5 replies; 12+ messages in thread From: Arnd Bergmann @ 2017-06-21 21:52 UTC (permalink / raw) To: Lorenzo Pieralisi, Bjorn Helgaas Cc: linux-pci, Arnd Bergmann, linux-arm-kernel, linux-kernel The last rework returned a variable that the compiler cannot prove to be initialized: arch/arm/mach-iop13xx/pci.c: In function 'iop13xx_scan_bus': arch/arm/mach-iop13xx/pci.c:509:17: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] In the switch statement that sets the return value, this adds a default returning an error. Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- arch/arm/mach-iop13xx/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index b97879bfb81a..3c51a9bb9b49 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c @@ -553,6 +553,8 @@ int iop13xx_scan_bus(int nr, struct pci_host_bridge *bridge) if (!ret) pci_bus_atue = bridge->bus; break; + default: + ret = -EINVAL; } return ret; -- 2.9.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again 2017-06-21 21:52 [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Arnd Bergmann @ 2017-06-21 21:53 ` Arnd Bergmann 2017-06-22 9:38 ` Lorenzo Pieralisi 2017-06-21 21:53 ` [PATCH 3/4] PCI: versatile: fix typo Arnd Bergmann ` (3 subsequent siblings) 4 siblings, 1 reply; 12+ messages in thread From: Arnd Bergmann @ 2017-06-21 21:53 UTC (permalink / raw) To: Lorenzo Pieralisi, Bjorn Helgaas Cc: linux-pci, Arnd Bergmann, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Gregory Clement, linux-arm-kernel, linux-kernel We used to pass the operations when calling pci_scan_root_bus, but that argument was removed: arch/arm/mach-mv78xx0/pcie.c:175:23: error: 'pcie_ops' defined but not used [-Werror=unused-variable] Setting it in pci_hw should address this. Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- arch/arm/mach-mv78xx0/pcie.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index 2b406e909a43..cb7f95c9d8eb 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c @@ -214,6 +214,7 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, } static struct hw_pci mv78xx0_pci __initdata = { + .ops = &pcie_ops, .nr_controllers = 8, .preinit = mv78xx0_pcie_preinit, .setup = mv78xx0_pcie_setup, -- 2.9.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again 2017-06-21 21:53 ` [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again Arnd Bergmann @ 2017-06-22 9:38 ` Lorenzo Pieralisi 2017-06-27 23:11 ` Bjorn Helgaas 0 siblings, 1 reply; 12+ messages in thread From: Lorenzo Pieralisi @ 2017-06-22 9:38 UTC (permalink / raw) To: Arnd Bergmann Cc: Bjorn Helgaas, linux-pci, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Gregory Clement, linux-arm-kernel, linux-kernel On Wed, Jun 21, 2017 at 11:53:00PM +0200, Arnd Bergmann wrote: > We used to pass the operations when calling pci_scan_root_bus, but > that argument was removed: > > arch/arm/mach-mv78xx0/pcie.c:175:23: error: 'pcie_ops' defined but not used [-Werror=unused-variable] > > Setting it in pci_hw should address this. No unfortunately it does not. The way I structured the code the bridge set-up is carried out in the struct hw_pci.scan() callback and for mv78xx0 it was not done properly. As said in the other thread we need a pci_fixup_irqs() removal v3 to address these issues, given that on some host bridges v2 it is still untested. Lorenzo > Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > arch/arm/mach-mv78xx0/pcie.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c > index 2b406e909a43..cb7f95c9d8eb 100644 > --- a/arch/arm/mach-mv78xx0/pcie.c > +++ b/arch/arm/mach-mv78xx0/pcie.c > @@ -214,6 +214,7 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, > } > > static struct hw_pci mv78xx0_pci __initdata = { > + .ops = &pcie_ops, > .nr_controllers = 8, > .preinit = mv78xx0_pcie_preinit, > .setup = mv78xx0_pcie_setup, > -- > 2.9.0 > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again 2017-06-22 9:38 ` Lorenzo Pieralisi @ 2017-06-27 23:11 ` Bjorn Helgaas 2017-07-01 13:54 ` Lorenzo Pieralisi 0 siblings, 1 reply; 12+ messages in thread From: Bjorn Helgaas @ 2017-06-27 23:11 UTC (permalink / raw) To: Lorenzo Pieralisi Cc: Arnd Bergmann, Andrew Lunn, Jason Cooper, linux-pci, linux-kernel, Gregory Clement, Bjorn Helgaas, linux-arm-kernel, Sebastian Hesselbarth On Thu, Jun 22, 2017 at 10:38:55AM +0100, Lorenzo Pieralisi wrote: > On Wed, Jun 21, 2017 at 11:53:00PM +0200, Arnd Bergmann wrote: > > We used to pass the operations when calling pci_scan_root_bus, but > > that argument was removed: > > > > arch/arm/mach-mv78xx0/pcie.c:175:23: error: 'pcie_ops' defined but not used [-Werror=unused-variable] > > > > Setting it in pci_hw should address this. > > No unfortunately it does not. The way I structured the code the > bridge set-up is carried out in the struct hw_pci.scan() callback and > for mv78xx0 it was not done properly. > > As said in the other thread we need a pci_fixup_irqs() removal v3 to > address these issues, given that on some host bridges v2 it is still > untested. > > Lorenzo > > > Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > --- > > arch/arm/mach-mv78xx0/pcie.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c > > index 2b406e909a43..cb7f95c9d8eb 100644 > > --- a/arch/arm/mach-mv78xx0/pcie.c > > +++ b/arch/arm/mach-mv78xx0/pcie.c > > @@ -214,6 +214,7 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, > > } > > > > static struct hw_pci mv78xx0_pci __initdata = { > > + .ops = &pcie_ops, > > .nr_controllers = 8, > > .preinit = mv78xx0_pcie_preinit, > > .setup = mv78xx0_pcie_setup, I provisionally made the following change for mv78xx0, based on similar hunks for dove, iop13xx, and orion5x. This is on my pci/enumeration branch: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/enumeration&id=31ddd0eab68e19cf3dfc14321c99ff0b95cda4ad Please take a look and see if it makes sense. diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index 2b406e909a43..f793ebbd7539 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c @@ -201,6 +201,7 @@ static int __init mv78xx0_pcie_scan_bus(int nr, struct pci_host_bridge *bridge) return -EINVAL; } + bridge->ops = &pcie_ops; return pci_scan_root_bus_bridge(bridge); } ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again 2017-06-27 23:11 ` Bjorn Helgaas @ 2017-07-01 13:54 ` Lorenzo Pieralisi 2017-07-02 21:12 ` Bjorn Helgaas 0 siblings, 1 reply; 12+ messages in thread From: Lorenzo Pieralisi @ 2017-07-01 13:54 UTC (permalink / raw) To: Bjorn Helgaas Cc: Arnd Bergmann, Andrew Lunn, Jason Cooper, linux-pci, linux-kernel, Gregory Clement, Bjorn Helgaas, linux-arm-kernel, Sebastian Hesselbarth Hi Bjorn, On Tue, Jun 27, 2017 at 06:11:43PM -0500, Bjorn Helgaas wrote: > On Thu, Jun 22, 2017 at 10:38:55AM +0100, Lorenzo Pieralisi wrote: > > On Wed, Jun 21, 2017 at 11:53:00PM +0200, Arnd Bergmann wrote: > > > We used to pass the operations when calling pci_scan_root_bus, but > > > that argument was removed: > > > > > > arch/arm/mach-mv78xx0/pcie.c:175:23: error: 'pcie_ops' defined but not used [-Werror=unused-variable] > > > > > > Setting it in pci_hw should address this. > > > > No unfortunately it does not. The way I structured the code the > > bridge set-up is carried out in the struct hw_pci.scan() callback and > > for mv78xx0 it was not done properly. > > > > As said in the other thread we need a pci_fixup_irqs() removal v3 to > > address these issues, given that on some host bridges v2 it is still > > untested. > > > > Lorenzo > > > > > Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > > --- > > > arch/arm/mach-mv78xx0/pcie.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c > > > index 2b406e909a43..cb7f95c9d8eb 100644 > > > --- a/arch/arm/mach-mv78xx0/pcie.c > > > +++ b/arch/arm/mach-mv78xx0/pcie.c > > > @@ -214,6 +214,7 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, > > > } > > > > > > static struct hw_pci mv78xx0_pci __initdata = { > > > + .ops = &pcie_ops, > > > .nr_controllers = 8, > > > .preinit = mv78xx0_pcie_preinit, > > > .setup = mv78xx0_pcie_setup, > > I provisionally made the following change for mv78xx0, based on similar > hunks for dove, iop13xx, and orion5x. > > This is on my pci/enumeration branch: > > https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/enumeration&id=31ddd0eab68e19cf3dfc14321c99ff0b95cda4ad > > Please take a look and see if it makes sense. It makes code compile but it is missing some initializations. Patch below, to be folded in commit e592c4a52cb8 ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") in your pci/irq-fixups branch, I did that and recompiled (I can't test this code) and everything seems fine. Thanks a lot ! Lorenzo -- >8 -- diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index f793ebb..636d84b 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c @@ -196,12 +196,19 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup); static int __init mv78xx0_pcie_scan_bus(int nr, struct pci_host_bridge *bridge) { + struct pci_sys_data *sys = pci_host_bridge_priv(bridge); + if (nr >= num_pcie_ports) { BUG(); return -EINVAL; } + list_splice_init(&sys->resources, &bridge->windows); + bridge->dev.parent = NULL; + bridge->sysdata = sys; + bridge->busnr = sys->busnr; bridge->ops = &pcie_ops; + return pci_scan_root_bus_bridge(bridge); } -- 2.10.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again 2017-07-01 13:54 ` Lorenzo Pieralisi @ 2017-07-02 21:12 ` Bjorn Helgaas 0 siblings, 0 replies; 12+ messages in thread From: Bjorn Helgaas @ 2017-07-02 21:12 UTC (permalink / raw) To: Lorenzo Pieralisi Cc: Arnd Bergmann, Andrew Lunn, Jason Cooper, linux-pci, linux-kernel, Gregory Clement, Bjorn Helgaas, linux-arm-kernel, Sebastian Hesselbarth On Sat, Jul 01, 2017 at 02:54:57PM +0100, Lorenzo Pieralisi wrote: > Hi Bjorn, > > On Tue, Jun 27, 2017 at 06:11:43PM -0500, Bjorn Helgaas wrote: > > On Thu, Jun 22, 2017 at 10:38:55AM +0100, Lorenzo Pieralisi wrote: > > > On Wed, Jun 21, 2017 at 11:53:00PM +0200, Arnd Bergmann wrote: > > > > We used to pass the operations when calling pci_scan_root_bus, but > > > > that argument was removed: > > > > > > > > arch/arm/mach-mv78xx0/pcie.c:175:23: error: 'pcie_ops' defined but not used [-Werror=unused-variable] > > > > > > > > Setting it in pci_hw should address this. > > > > > > No unfortunately it does not. The way I structured the code the > > > bridge set-up is carried out in the struct hw_pci.scan() callback and > > > for mv78xx0 it was not done properly. > > > > > > As said in the other thread we need a pci_fixup_irqs() removal v3 to > > > address these issues, given that on some host bridges v2 it is still > > > untested. > > > > > > Lorenzo > > > > > > > Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") > > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > > > --- > > > > arch/arm/mach-mv78xx0/pcie.c | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > > > diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c > > > > index 2b406e909a43..cb7f95c9d8eb 100644 > > > > --- a/arch/arm/mach-mv78xx0/pcie.c > > > > +++ b/arch/arm/mach-mv78xx0/pcie.c > > > > @@ -214,6 +214,7 @@ static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, > > > > } > > > > > > > > static struct hw_pci mv78xx0_pci __initdata = { > > > > + .ops = &pcie_ops, > > > > .nr_controllers = 8, > > > > .preinit = mv78xx0_pcie_preinit, > > > > .setup = mv78xx0_pcie_setup, > > > > I provisionally made the following change for mv78xx0, based on similar > > hunks for dove, iop13xx, and orion5x. > > > > This is on my pci/enumeration branch: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git/commit/?h=pci/enumeration&id=31ddd0eab68e19cf3dfc14321c99ff0b95cda4ad > > > > Please take a look and see if it makes sense. > > It makes code compile but it is missing some initializations. > > Patch below, to be folded in commit > > e592c4a52cb8 ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") > > in your pci/irq-fixups branch, I did that and recompiled (I can't test > this code) and everything seems fine. Folded into pci/irq-fixups, thanks! > -- >8 -- > diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c > index f793ebb..636d84b 100644 > --- a/arch/arm/mach-mv78xx0/pcie.c > +++ b/arch/arm/mach-mv78xx0/pcie.c > @@ -196,12 +196,19 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL, PCI_ANY_ID, rc_pci_fixup); > > static int __init mv78xx0_pcie_scan_bus(int nr, struct pci_host_bridge *bridge) > { > + struct pci_sys_data *sys = pci_host_bridge_priv(bridge); > + > if (nr >= num_pcie_ports) { > BUG(); > return -EINVAL; > } > > + list_splice_init(&sys->resources, &bridge->windows); > + bridge->dev.parent = NULL; > + bridge->sysdata = sys; > + bridge->busnr = sys->busnr; > bridge->ops = &pcie_ops; > + > return pci_scan_root_bus_bridge(bridge); > } > > -- > 2.10.0 > ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/4] PCI: versatile: fix typo 2017-06-21 21:52 [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Arnd Bergmann 2017-06-21 21:53 ` [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again Arnd Bergmann @ 2017-06-21 21:53 ` Arnd Bergmann 2017-06-27 22:49 ` Bjorn Helgaas 2017-06-21 21:53 ` [PATCH 4/4] PCI: versatile: fix another typo Arnd Bergmann ` (2 subsequent siblings) 4 siblings, 1 reply; 12+ messages in thread From: Arnd Bergmann @ 2017-06-21 21:53 UTC (permalink / raw) To: Lorenzo Pieralisi, Bjorn Helgaas Cc: linux-pci, Arnd Bergmann, Rob Herring, Brian Norris, linux-arm-kernel, linux-kernel There is no 'dev' variable in this function: drivers/pci/host/pci-versatile.c: In function 'versatile_pci_probe': drivers/pci/host/pci-versatile.c:131:38: error: 'dev' undeclared (first use in this function); did you mean 'pdev'? This passes the device embedded in the platform_device instead. Fixes: 433d2671da1b ("PCI: versatile: Convert PCI scan API to pci_scan_root_bus_bridge()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/pci/host/pci-versatile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-versatile.c b/drivers/pci/host/pci-versatile.c index 3be25a9dd29a..f572c921cdd4 100644 --- a/drivers/pci/host/pci-versatile.c +++ b/drivers/pci/host/pci-versatile.c @@ -128,7 +128,7 @@ static int versatile_pci_probe(struct platform_device *pdev) struct pci_host_bridge *bridge; LIST_HEAD(pci_res); - bridge = devm_pci_alloc_host_bridge(dev, 0); + bridge = devm_pci_alloc_host_bridge(&pdev->dev, 0); if (!bridge) return -ENOMEM; -- 2.9.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 3/4] PCI: versatile: fix typo 2017-06-21 21:53 ` [PATCH 3/4] PCI: versatile: fix typo Arnd Bergmann @ 2017-06-27 22:49 ` Bjorn Helgaas 0 siblings, 0 replies; 12+ messages in thread From: Bjorn Helgaas @ 2017-06-27 22:49 UTC (permalink / raw) To: Arnd Bergmann Cc: Lorenzo Pieralisi, Bjorn Helgaas, Rob Herring, linux-pci, Brian Norris, linux-kernel, linux-arm-kernel On Wed, Jun 21, 2017 at 11:53:01PM +0200, Arnd Bergmann wrote: > There is no 'dev' variable in this function: > > drivers/pci/host/pci-versatile.c: In function 'versatile_pci_probe': > drivers/pci/host/pci-versatile.c:131:38: error: 'dev' undeclared (first use in this function); did you mean 'pdev'? > > This passes the device embedded in the platform_device instead. > > Fixes: 433d2671da1b ("PCI: versatile: Convert PCI scan API to pci_scan_root_bus_bridge()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Folded into Lorenzo's series on pci/enumeration, thanks! > --- > drivers/pci/host/pci-versatile.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/host/pci-versatile.c b/drivers/pci/host/pci-versatile.c > index 3be25a9dd29a..f572c921cdd4 100644 > --- a/drivers/pci/host/pci-versatile.c > +++ b/drivers/pci/host/pci-versatile.c > @@ -128,7 +128,7 @@ static int versatile_pci_probe(struct platform_device *pdev) > struct pci_host_bridge *bridge; > LIST_HEAD(pci_res); > > - bridge = devm_pci_alloc_host_bridge(dev, 0); > + bridge = devm_pci_alloc_host_bridge(&pdev->dev, 0); > if (!bridge) > return -ENOMEM; > > -- > 2.9.0 > > > _______________________________________________ > 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] 12+ messages in thread
* [PATCH 4/4] PCI: versatile: fix another typo 2017-06-21 21:52 [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Arnd Bergmann 2017-06-21 21:53 ` [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again Arnd Bergmann 2017-06-21 21:53 ` [PATCH 3/4] PCI: versatile: fix typo Arnd Bergmann @ 2017-06-21 21:53 ` Arnd Bergmann 2017-06-27 22:52 ` Bjorn Helgaas 2017-06-22 8:47 ` [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Lorenzo Pieralisi 2017-06-27 22:37 ` Bjorn Helgaas 4 siblings, 1 reply; 12+ messages in thread From: Arnd Bergmann @ 2017-06-21 21:53 UTC (permalink / raw) To: Lorenzo Pieralisi, Bjorn Helgaas Cc: linux-pci, Arnd Bergmann, Rob Herring, Brian Norris, linux-arm-kernel, linux-kernel The struct members were added to the wrong variable: drivers/pci/host/pci-versatile.c: In function 'versatile_pci_probe': drivers/pci/host/pci-versatile.c:212:2: error: 'host' undeclared (first use in this function) Fixes: 997995e1722a ("PCI: versatile: Drop pci_fixup_irqs()") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/pci/host/pci-versatile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-versatile.c b/drivers/pci/host/pci-versatile.c index f572c921cdd4..f6fcec6b5578 100644 --- a/drivers/pci/host/pci-versatile.c +++ b/drivers/pci/host/pci-versatile.c @@ -209,8 +209,8 @@ static int versatile_pci_probe(struct platform_device *pdev) bridge->sysdata = NULL; bridge->busnr = 0; bridge->ops = &pci_versatile_ops; - host->map_irq = of_irq_parse_and_map_pci; - host->swizzle_irq = pci_common_swizzle; + bridge->map_irq = of_irq_parse_and_map_pci; + bridge->swizzle_irq = pci_common_swizzle; ret = pci_scan_root_bus_bridge(bridge); if (ret < 0) -- 2.9.0 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 4/4] PCI: versatile: fix another typo 2017-06-21 21:53 ` [PATCH 4/4] PCI: versatile: fix another typo Arnd Bergmann @ 2017-06-27 22:52 ` Bjorn Helgaas 0 siblings, 0 replies; 12+ messages in thread From: Bjorn Helgaas @ 2017-06-27 22:52 UTC (permalink / raw) To: Arnd Bergmann Cc: Lorenzo Pieralisi, Bjorn Helgaas, linux-pci, Rob Herring, Brian Norris, linux-arm-kernel, linux-kernel On Wed, Jun 21, 2017 at 11:53:02PM +0200, Arnd Bergmann wrote: > The struct members were added to the wrong variable: > > drivers/pci/host/pci-versatile.c: In function 'versatile_pci_probe': > drivers/pci/host/pci-versatile.c:212:2: error: 'host' undeclared (first use in this function) > > Fixes: 997995e1722a ("PCI: versatile: Drop pci_fixup_irqs()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Folded into Lorenzo's series on pci/enumeration, thanks! > --- > drivers/pci/host/pci-versatile.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/host/pci-versatile.c b/drivers/pci/host/pci-versatile.c > index f572c921cdd4..f6fcec6b5578 100644 > --- a/drivers/pci/host/pci-versatile.c > +++ b/drivers/pci/host/pci-versatile.c > @@ -209,8 +209,8 @@ static int versatile_pci_probe(struct platform_device *pdev) > bridge->sysdata = NULL; > bridge->busnr = 0; > bridge->ops = &pci_versatile_ops; > - host->map_irq = of_irq_parse_and_map_pci; > - host->swizzle_irq = pci_common_swizzle; > + bridge->map_irq = of_irq_parse_and_map_pci; > + bridge->swizzle_irq = pci_common_swizzle; > > ret = pci_scan_root_bus_bridge(bridge); > if (ret < 0) > -- > 2.9.0 > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning 2017-06-21 21:52 [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Arnd Bergmann ` (2 preceding siblings ...) 2017-06-21 21:53 ` [PATCH 4/4] PCI: versatile: fix another typo Arnd Bergmann @ 2017-06-22 8:47 ` Lorenzo Pieralisi 2017-06-27 22:37 ` Bjorn Helgaas 4 siblings, 0 replies; 12+ messages in thread From: Lorenzo Pieralisi @ 2017-06-22 8:47 UTC (permalink / raw) To: Arnd Bergmann, Bjorn Helgaas; +Cc: linux-pci, linux-arm-kernel, linux-kernel On Wed, Jun 21, 2017 at 11:52:59PM +0200, Arnd Bergmann wrote: > The last rework returned a variable that the compiler cannot prove > to be initialized: > > arch/arm/mach-iop13xx/pci.c: In function 'iop13xx_scan_bus': > arch/arm/mach-iop13xx/pci.c:509:17: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > In the switch statement that sets the return value, this adds > a default returning an error. > > Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > arch/arm/mach-iop13xx/pci.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c > index b97879bfb81a..3c51a9bb9b49 100644 > --- a/arch/arm/mach-iop13xx/pci.c > +++ b/arch/arm/mach-iop13xx/pci.c > @@ -553,6 +553,8 @@ int iop13xx_scan_bus(int nr, struct pci_host_bridge *bridge) > if (!ret) > pci_bus_atue = bridge->bus; > break; > + default: > + ret = -EINVAL; > } > > return ret; Ok I managed to miss these ones somehow, apologies. This series can be squashed into the initial series but there is also Linus' fix for faraday to address: https://patchwork.ozlabs.org/patch/778999/ I can respin a v3 but I am off the radar next week so timing for the pci_fixup_irqs() removal looks bad, I am not sure what's the next course of action but I think it is better to drop it for this cycle and wait for 4.14 (hopefully there are not many PCI host bridges updates to rebase but I will cope with that anyway - that's the best I can do). Thanks, Lorenzo ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning 2017-06-21 21:52 [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Arnd Bergmann ` (3 preceding siblings ...) 2017-06-22 8:47 ` [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Lorenzo Pieralisi @ 2017-06-27 22:37 ` Bjorn Helgaas 4 siblings, 0 replies; 12+ messages in thread From: Bjorn Helgaas @ 2017-06-27 22:37 UTC (permalink / raw) To: Arnd Bergmann Cc: Lorenzo Pieralisi, Bjorn Helgaas, linux-pci, linux-arm-kernel, linux-kernel On Wed, Jun 21, 2017 at 11:52:59PM +0200, Arnd Bergmann wrote: > The last rework returned a variable that the compiler cannot prove > to be initialized: > > arch/arm/mach-iop13xx/pci.c: In function 'iop13xx_scan_bus': > arch/arm/mach-iop13xx/pci.c:509:17: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > In the switch statement that sets the return value, this adds > a default returning an error. > > Fixes: ace27646da8e ("ARM/PCI: Convert PCI scan API to pci_scan_root_bus_bridge()") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Folded into Lorenzo's series on pci/enumeration, thanks! > --- > arch/arm/mach-iop13xx/pci.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c > index b97879bfb81a..3c51a9bb9b49 100644 > --- a/arch/arm/mach-iop13xx/pci.c > +++ b/arch/arm/mach-iop13xx/pci.c > @@ -553,6 +553,8 @@ int iop13xx_scan_bus(int nr, struct pci_host_bridge *bridge) > if (!ret) > pci_bus_atue = bridge->bus; > break; > + default: > + ret = -EINVAL; > } > > return ret; > -- > 2.9.0 > > > _______________________________________________ > 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] 12+ messages in thread
end of thread, other threads:[~2017-07-02 21:12 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-06-21 21:52 [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Arnd Bergmann 2017-06-21 21:53 ` [PATCH 2/4] ARM/PCI: mv78xx0: pass pci_ops correctly again Arnd Bergmann 2017-06-22 9:38 ` Lorenzo Pieralisi 2017-06-27 23:11 ` Bjorn Helgaas 2017-07-01 13:54 ` Lorenzo Pieralisi 2017-07-02 21:12 ` Bjorn Helgaas 2017-06-21 21:53 ` [PATCH 3/4] PCI: versatile: fix typo Arnd Bergmann 2017-06-27 22:49 ` Bjorn Helgaas 2017-06-21 21:53 ` [PATCH 4/4] PCI: versatile: fix another typo Arnd Bergmann 2017-06-27 22:52 ` Bjorn Helgaas 2017-06-22 8:47 ` [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Lorenzo Pieralisi 2017-06-27 22:37 ` Bjorn Helgaas
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).