[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/8] spapr/pci: Clean up local variable shadowing in spapr_phb_re
From: |
Cédric Le Goater |
Subject: |
[PATCH 7/8] spapr/pci: Clean up local variable shadowing in spapr_phb_realize() |
Date: |
Mon, 18 Sep 2023 16:58:49 +0200 |
Rename SysBusDevice variable to avoid this warning :
../hw/ppc/spapr_pci.c: In function ‘spapr_phb_realize’:
../hw/ppc/spapr_pci.c:1872:24: warning: declaration of ‘s’ shadows a previous
local [-Wshadow=local]
1872 | SpaprPhbState *s;
| ^
../hw/ppc/spapr_pci.c:1829:19: note: shadowed declaration is here
1829 | SysBusDevice *s = SYS_BUS_DEVICE(dev);
| ^
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/ppc/spapr_pci.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index ce1495931744..370c5a90f218 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1826,9 +1826,9 @@ static void spapr_phb_realize(DeviceState *dev, Error
**errp)
(SpaprMachineState *) object_dynamic_cast(qdev_get_machine(),
TYPE_SPAPR_MACHINE);
SpaprMachineClass *smc = spapr ? SPAPR_MACHINE_GET_CLASS(spapr) : NULL;
- SysBusDevice *s = SYS_BUS_DEVICE(dev);
- SpaprPhbState *sphb = SPAPR_PCI_HOST_BRIDGE(s);
- PCIHostState *phb = PCI_HOST_BRIDGE(s);
+ SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
+ SpaprPhbState *sphb = SPAPR_PCI_HOST_BRIDGE(sbd);
+ PCIHostState *phb = PCI_HOST_BRIDGE(sbd);
MachineState *ms = MACHINE(spapr);
char *namebuf;
int i;
--
2.41.0
- Re: [PATCH 8/8] spapr/drc: Clean up local variable shadowing in prop_get_fdt(), (continued)
- Re: [PATCH 8/8] spapr/drc: Clean up local variable shadowing in prop_get_fdt(), Harsh Prateek Bora, 2023/09/19
- Re: [PATCH 8/8] spapr/drc: Clean up local variable shadowing in prop_get_fdt(), Cédric Le Goater, 2023/09/19
- Re: [PATCH 8/8] spapr/drc: Clean up local variable shadowing in prop_get_fdt(), Harsh Prateek Bora, 2023/09/19
- Re: [PATCH 8/8] spapr/drc: Clean up local variable shadowing in prop_get_fdt(), Markus Armbruster, 2023/09/29
- Re: [PATCH 8/8] spapr/drc: Clean up local variable shadowing in prop_get_fdt(), Cédric Le Goater, 2023/09/29
- Re: [PATCH 8/8] spapr/drc: Clean up local variable shadowing in prop_get_fdt(), Harsh Prateek Bora, 2023/09/29
[PATCH 5/8] spapr: Clean up local variable shadowing in spapr_get_fw_dev_path(), Cédric Le Goater, 2023/09/18
[PATCH 7/8] spapr/pci: Clean up local variable shadowing in spapr_phb_realize(),
Cédric Le Goater <=
[PATCH 6/8] spapr/drc: Clean up local variable shadowing in rtas_ibm_configure_connector(), Cédric Le Goater, 2023/09/18
[PATCH 4/8] spapr: Clean up local variable shadowing in spapr_init_cpus(), Cédric Le Goater, 2023/09/18