[03/15] sim: bfin: fix -Wshadow=local warnings

Message ID 20231222012355.7504-3-vapier@gentoo.org
State New
Headers
Series [01/15] sim: aarch64: fix -Wshadow=local warnings |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_gdb_build--master-arm fail Patch failed to apply

Commit Message

Mike Frysinger Dec. 22, 2023, 1:23 a.m. UTC
  Rename the shadowed var to avoid confusion with the function argument
as to which address this code is using.
---
 sim/bfin/dv-bfin_mmu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
  

Patch

diff --git a/sim/bfin/dv-bfin_mmu.c b/sim/bfin/dv-bfin_mmu.c
index c14e2088c1f1..3d244344ac0c 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: