From: Cédric Le Goater <c...@kaod.org> to fix :
../hw/ppc/pnv_psi.c: In function ‘pnv_psi_p9_mmio_write’: ../hw/ppc/pnv_psi.c:741:24: warning: declaration of ‘addr’ shadows a parameter [-Wshadow=compatible-local] 741 | hwaddr addr = val & ~(PSIHB9_ESB_CI_VALID | PSIHB10_ESB_CI_64K); | ^~~~ ../hw/ppc/pnv_psi.c:702:56: note: shadowed declaration is here 702 | static void pnv_psi_p9_mmio_write(void *opaque, hwaddr addr, | ~~~~~~~^~~~ Signed-off-by: Cédric Le Goater <c...@kaod.org> Message-ID: <20230918145850.241074-3-...@kaod.org> Reviewed-by: Harsh Prateek Bora <hars...@linux.ibm.com> Signed-off-by: Markus Armbruster <arm...@redhat.com> --- hw/ppc/pnv_psi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index daaa2f0575..26460d210d 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -738,8 +738,9 @@ static void pnv_psi_p9_mmio_write(void *opaque, hwaddr addr, } } else { if (!(psi->regs[reg] & PSIHB9_ESB_CI_VALID)) { - hwaddr addr = val & ~(PSIHB9_ESB_CI_VALID | PSIHB10_ESB_CI_64K); - memory_region_add_subregion(sysmem, addr, + hwaddr esb_addr = + val & ~(PSIHB9_ESB_CI_VALID | PSIHB10_ESB_CI_64K); + memory_region_add_subregion(sysmem, esb_addr, &psi9->source.esb_mmio); } } -- 2.41.0