From patchwork Fri Dec 22 01:23:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 82719 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B1869384CBAF for ; Fri, 22 Dec 2023 01:24:38 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 358D03858420 for ; Fri, 22 Dec 2023 01:24:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 358D03858420 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 358D03858420 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=140.211.166.183 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703208243; cv=none; b=tXZe2/rZ6W+w0/Y2ZLX6qmswamyh15QJmu+PoDahDxyhUMOIK6U529R2LG5yGwJU3ZU9T0zQh9CPJNG9ba8ysNVtf9GYlCNpMvZPU7S+bugw0bbE5AZOt+Kumvej3lUwgEuuHT49dTfULCU52B5jMZOrlI1yfXvoRlMo561PfD8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703208243; c=relaxed/simple; bh=Z7rK7FJyRx964nZGJ3PzcIh7TUh076spcJHXLFArzdU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=cGyOUXKMJOGzAWwZo1z/CYY/dIKg/gNDOPMPGsnZjiOWlKLUZk8gW2wxOBrxCCVSKJOuK8176FalR117ow2TiSrCzRCOR4RV7gMDCMsu50t/QH4oZHmLCqV+te80vJU050Nfs5YIly7/kq/QgTaGDGJkg1+SBz1r+TQSW2TJxb4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by smtp.gentoo.org (Postfix, from userid 559) id D71AA340BEF; Fri, 22 Dec 2023 01:24:01 +0000 (UTC) From: Mike Frysinger To: gdb-patches@sourceware.org Subject: [PATCH 03/15] sim: bfin: fix -Wshadow=local warnings Date: Thu, 21 Dec 2023 20:23:43 -0500 Message-ID: <20231222012355.7504-3-vapier@gentoo.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222012355.7504-1-vapier@gentoo.org> References: <20231222012355.7504-1-vapier@gentoo.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.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: