From: Mike Frysinger Date: Fri, 22 Dec 2023 01:07:00 +0000 (-0500) Subject: sim: bfin: fix -Wshadow=local warnings X-Git-Tag: upstream/2.42~412 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5f347a1106f5ca0924a47e4b1c652092c76abbb1;p=platform%2Fupstream%2Fbinutils.git sim: bfin: fix -Wshadow=local warnings Rename the shadowed var to avoid confusion with the function argument as to which address this code is using. --- diff --git a/sim/bfin/dv-bfin_mmu.c b/sim/bfin/dv-bfin_mmu.c index c14e208..3d24434 100644 --- a/sim/bfin/dv-bfin_mmu.c +++ b/sim/bfin/dv-bfin_mmu.c @@ -144,7 +144,7 @@ bfin_mmu_io_write_buffer (struct hw *me, const void *source, *valuep = value; if (value) { - bu32 addr = mmu->sram_base_address | + bu32 sram_addr = mmu->sram_base_address | ((value >> (26 - 11)) & (1 << 11)) | /* addr bit 11 (Way0/Way1) */ ((value >> (24 - 21)) & (1 << 21)) | /* addr bit 21 (Data/Inst) */ ((value >> (23 - 15)) & (1 << 15)) | /* addr bit 15 (Data Bank) */ @@ -157,9 +157,9 @@ bfin_mmu_io_write_buffer (struct hw *me, const void *source, hw_abort (me, "DTEST_COMMAND bits undefined"); if (value & TEST_WRITE) - sim_write (hw_system (me), addr, mmu->dtest_data, 8); + sim_write (hw_system (me), sram_addr, mmu->dtest_data, 8); else - sim_read (hw_system (me), addr, mmu->dtest_data, 8); + sim_read (hw_system (me), sram_addr, mmu->dtest_data, 8); } break; default: