[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/8] spapr/drc: Clean up local variable shadowing in rtas_ibm_con
From: |
Cédric Le Goater |
Subject: |
[PATCH 6/8] spapr/drc: Clean up local variable shadowing in rtas_ibm_configure_connector() |
Date: |
Mon, 18 Sep 2023 16:58:48 +0200 |
Remove extra 'drc_index' variable to avoid this warning :
../hw/ppc/spapr_drc.c: In function ‘rtas_ibm_configure_connector’:
../hw/ppc/spapr_drc.c:1240:26: warning: declaration of ‘drc_index’ shadows a
previous local [-Wshadow=compatible-local]
1240 | uint32_t drc_index = spapr_drc_index(drc);
| ^~~~~~~~~
../hw/ppc/spapr_drc.c:1155:14: note: shadowed declaration is here
1155 | uint32_t drc_index;
| ^~~~~~~~~
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/ppc/spapr_drc.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/hw/ppc/spapr_drc.c b/hw/ppc/spapr_drc.c
index b5c400a94d1c..843e318312d3 100644
--- a/hw/ppc/spapr_drc.c
+++ b/hw/ppc/spapr_drc.c
@@ -1237,8 +1237,6 @@ static void rtas_ibm_configure_connector(PowerPCCPU *cpu,
case FDT_END_NODE:
drc->ccs_depth--;
if (drc->ccs_depth == 0) {
- uint32_t drc_index = spapr_drc_index(drc);
-
/* done sending the device tree, move to configured state */
trace_spapr_drc_set_configured(drc_index);
drc->state = drck->ready_state;
--
2.41.0
- Re: [PATCH 8/8] spapr/drc: Clean up local variable shadowing in prop_get_fdt(), (continued)
[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, 2023/09/18
[PATCH 6/8] spapr/drc: Clean up local variable shadowing in rtas_ibm_configure_connector(),
Cédric Le Goater <=
[PATCH 4/8] spapr: Clean up local variable shadowing in spapr_init_cpus(), Cédric Le Goater, 2023/09/18
[PATCH 3/8] spapr: Clean up local variable shadowing in spapr_dt_cpus(), Cédric Le Goater, 2023/09/18