From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 03/15] sim: bfin: fix -Wshadow=local warnings
Date: Thu, 21 Dec 2023 20:23:43 -0500 [thread overview]
Message-ID: <20231222012355.7504-3-vapier@gentoo.org> (raw)
In-Reply-To: <20231222012355.7504-1-vapier@gentoo.org>
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(-)
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:
--
2.43.0
next prev parent reply other threads:[~2023-12-22 1:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-22 1:23 [PATCH 01/15] sim: aarch64: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 02/15] sim: arm: " Mike Frysinger
2023-12-22 1:23 ` Mike Frysinger [this message]
2023-12-22 1:23 ` [PATCH 04/15] sim: common: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 05/15] sim: cris: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 06/15] sim: erc32: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 07/15] sim: frv: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 08/15] sim: h8300: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 09/15] sim: iq2000: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 10/15] sim: m68hc11: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 11/15] sim: mips: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 12/15] sim: ppc: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 13/15] sim: riscv: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 14/15] sim: sh: " Mike Frysinger
2023-12-22 1:23 ` [PATCH 15/15] sim: warnings: enable -Wshadow=local Mike Frysinger
2023-12-22 15:26 ` Tom Tromey
2023-12-23 4:28 ` [PATCH] sim: m32c: fix -Wshadow=local warnings Mike Frysinger
2023-12-23 4:28 ` [PATCH] sim: cris: disable -Wshadow=local in generated mloop files Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231222012355.7504-3-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).