From patchwork Mon Oct 9 09:24:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 730964 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1108307wrw; Mon, 9 Oct 2023 02:25:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFVLEd68OW9WWm5U7rI0DNF9YLV9IDlu6pOP/wV4yaN7ILaObZsndMBlCOxuayVaJ6hKO05 X-Received: by 2002:a05:620a:4622:b0:76f:1ead:ddb9 with SMTP id br34-20020a05620a462200b0076f1eadddb9mr16490586qkb.51.1696843523031; Mon, 09 Oct 2023 02:25:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696843523; cv=none; d=google.com; s=arc-20160816; b=j+yGvgVwN0LBnZbiqj6bTdgDfvGkdmvk8TmhukQsYVq6gLW0ifPUqC15ORKe3WhSF7 Xq6iTuWpaR7xX2CBlQv9U6Bx8K+jjh1GbezQ+F/pXS3igSQx2RjcH4iD6KiQBGEp0E5f daxAwaVBt2a/cFPY5kKFxsfk+lRRDf393XwBOVckSapXXKVRWYQC5+7/ofqFVFlvP0mM z5n5gtlDIHZMON0XSkUg5GnpQd2JHCHazGfmqGXaObaVz4CPPQEOULXgNqriPammhul0 T8n5vixFLdaaDk8hvZ1PXwBXG1+tb6q+h0FZUM10HV5Ad7MCk7yh1mIk/I70M7SQUaod agQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=2fe4kejQ+gNSKuaihInbio7ohEhriksd0K5ohb5f1Ns=; fh=ZHwsD0pWKA4Ka8DlcwgFWnufRcX4QFcoy6ABBpkn2Aw=; b=DTwDtacR9/5xPN3rpFc81C+8AHWiEbfOmxR9MfZ6MdfNRTS1s2z0omKHa3zpHf5sdp 1sSDZ2u3zTs2ctS/D+/okpGUsikHmocDS/T36KbgU01rIxJ7+8I+OfrNN5n5vDF3jQhe 026Eb+yYEc8BL20ilzyW1yxBuXmMK2ScDbrKSC59HhhlRQv0n92R2uQHZ4klcfSUwed4 3W+Czk0d7DGAp0P4Vaer/YcaGD2QvtHMCWsw9SSoqMb0Kd2jnFoixA/LJ7X6f9amvpuU IURkwujmQ+T+5HnO/glnjQNWXjlYVwKWrOmi6FEpj8jCQhKyz2NA2IyHMkgbx/aRsG3A vtTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C+Hvt14p; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id dt55-20020a05620a47b700b00776f2642d26si5091935qkb.729.2023.10.09.02.25.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2023 02:25:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C+Hvt14p; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qpmVH-0000GY-U9; Mon, 09 Oct 2023 05:24:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qpmVF-0000Fs-4x for qemu-devel@nongnu.org; Mon, 09 Oct 2023 05:24:41 -0400 Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpmVD-0001bD-8m for qemu-devel@nongnu.org; Mon, 09 Oct 2023 05:24:40 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-98377c5d53eso740796766b.0 for ; Mon, 09 Oct 2023 02:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696843477; x=1697448277; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=2fe4kejQ+gNSKuaihInbio7ohEhriksd0K5ohb5f1Ns=; b=C+Hvt14pUkQ6iPv+CkiTPEk88IZnEDk33aQCRsm8uP6fWKLoLU1wxDyeu4kNh9D2WG DPDfpKz/hJf7Pg+TBxDk8VIsNZdvbNyXS/eO43JmIUvUl6S33UNFKMQaAv9HDFPvqUs1 9nK88KtvlFUhVPkIJ1HKmyttE/Aezn1HanXsOMmi8CC1UpfGmZ/WiHWtKgmDCWQUgfSY +xw90YxEwAaRqPYYc87/nZD5On9+Z51WcE60+F7I3SdDnYD+gEGxWQBcYz14TTxsIaDr bt+9zGA5bDkrNcoOX79+1/WEyNJyDJvzQ3t/knrxdbwytXmBpecKN44+w07sW8JiPGzg OMcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696843477; x=1697448277; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2fe4kejQ+gNSKuaihInbio7ohEhriksd0K5ohb5f1Ns=; b=hBHNxZxipXTO36JJ1c+hRtm/rSVVLX48mLbnL5VyjJXdVIcqOdQzeq0BVSoxxZlv09 GBXpiRxzWcEfMT+YOYHdl8vbMbYYc5b1q3VDN1fLnm+B1g5pYPNhgig5VSk74nXRiYUq jrlimTdrx+f+Gt3FUoLpxPkGxg0+AhUiMvHRngO+OFQ8ShY2LSSaV2g3dcqyV5SXjOIM SJeCDhfrqMIbdzQyKSbzA9pGNPS46KpeSUa1JiwFVXrWSRWc8GIKlvFpps/VyZSEQ7Em bIvzowTJc10GR/9Es3IPlXb0QwART3udPBF/mOWNKGW4cQrtMEux7a+tCGokDMTbzzae kcOA== X-Gm-Message-State: AOJu0YxkGKw91qY2TKLwdMPF1pRiMYk51icPnQXvhU5FfHEXIPwVZx/F mX6d2y01s+607bhvQdgdYkOtG7EJSGYV8IKzHIg= X-Received: by 2002:a17:906:cc0d:b0:9b2:b95e:3825 with SMTP id ml13-20020a170906cc0d00b009b2b95e3825mr12896317ejb.39.1696843477166; Mon, 09 Oct 2023 02:24:37 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id j17-20020a170906831100b009a16975ee5asm6424315ejx.169.2023.10.09.02.24.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 02:24:36 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH] target/sparc: Clean up global variable shadowing Date: Mon, 9 Oct 2023 11:24:34 +0200 Message-ID: <20231009092434.50356-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=philmd@linaro.org; helo=mail-ej1-x634.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fix: target/sparc/translate.c:2823:66: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] static void gen_load_trap_state_at_tl(TCGv_ptr r_tsptr, TCGv_env tcg_env) ^ include/tcg/tcg.h:579:17: note: previous declaration is here extern TCGv_env tcg_env; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland --- target/sparc/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/sparc/translate.c b/target/sparc/translate.c index f92ff80ac8..26ed371109 100644 --- a/target/sparc/translate.c +++ b/target/sparc/translate.c @@ -2820,19 +2820,19 @@ static void gen_fmovq(DisasContext *dc, DisasCompare *cmp, int rd, int rs) } #ifndef CONFIG_USER_ONLY -static void gen_load_trap_state_at_tl(TCGv_ptr r_tsptr, TCGv_env tcg_env) +static void gen_load_trap_state_at_tl(TCGv_ptr r_tsptr, TCGv_env env) { TCGv_i32 r_tl = tcg_temp_new_i32(); /* load env->tl into r_tl */ - tcg_gen_ld_i32(r_tl, tcg_env, offsetof(CPUSPARCState, tl)); + tcg_gen_ld_i32(r_tl, env, offsetof(CPUSPARCState, tl)); /* tl = [0 ... MAXTL_MASK] where MAXTL_MASK must be power of 2 */ tcg_gen_andi_i32(r_tl, r_tl, MAXTL_MASK); /* calculate offset to current trap state from env->ts, reuse r_tl */ tcg_gen_muli_i32(r_tl, r_tl, sizeof (trap_state)); - tcg_gen_addi_ptr(r_tsptr, tcg_env, offsetof(CPUSPARCState, ts)); + tcg_gen_addi_ptr(r_tsptr, env, offsetof(CPUSPARCState, ts)); /* tsptr = env->ts[env->tl & MAXTL_MASK] */ {