Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1672101 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2017-06-22 00:00 +0200 |
| Last post | 2017-06-28 00:40 +0200 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Arnd Bergmann <arnd@arndb.de> - 2017-06-22 00:00 +0200
Re: [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> - 2017-06-22 10:50 +0200
Re: [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning Bjorn Helgaas <helgaas@kernel.org> - 2017-06-28 00:40 +0200
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2017-06-22 00:00 +0200 |
| Subject | [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning |
| Message-ID | <tUVPj-3BI-3@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> |
|---|---|
| Date | 2017-06-22 10:50 +0200 |
| Subject | Re: [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning |
| Message-ID | <tV5Yn-2e1-39@gated-at.bofh.it> |
| In reply to | #1672101 |
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
[toc] | [prev] | [next] | [standalone]
| From | Bjorn Helgaas <helgaas@kernel.org> |
|---|---|
| Date | 2017-06-28 00:40 +0200 |
| Subject | Re: [PATCH 1/4] ARM/PCI: iop13xx: address uninitialized variable warning |
| Message-ID | <tX7jl-6UY-43@gated-at.bofh.it> |
| In reply to | #1672101 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web