From patchwork Mon Sep 4 16:28:22 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: 720006 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1694737wrh; Mon, 4 Sep 2023 09:29:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6NRQ9P0XPdRVsnbHpLiVKoO0mJjLEqkWJ4EKHu68lDBqdvxSmx2GjU5dNJ4fl6tCXN3Jd X-Received: by 2002:a05:620a:66c:b0:765:9c48:a930 with SMTP id a12-20020a05620a066c00b007659c48a930mr9536009qkh.67.1693844975419; Mon, 04 Sep 2023 09:29:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844975; cv=none; d=google.com; s=arc-20160816; b=E57iKda3mVn9njVGTF/G5aGoeMaXvBB0ilwN6c6pLrAoSF0kpYYCO0IZyWSoaQ5rjV /XxkNuqcRnkTU9D7A2ZKxte3zPfr/1mlb5RYzJNK0id7F7lhN/uYjt8E6MYjFT00y3br ymjRzjgQZuDuVzCjX0a5/F5r1ANpWSdf14NE0wl0ri8g6/LSMp0+eCzvhFi+Hqghruix 5oWEeOit2L5yKu2nvJjaYdKr9Bxl4gwyHccS/p/B2MTs9l690LWh84ofqcbJiJ5SRTyb S4or1jspAk2djH93lQbpQiI/EwFuw+5LU0S1uW1Ofk21lNXypTIMojy2MvfqUtuFSt+W GpqA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wMO9Sabs/iEDm+ChlLb7bnpjmC8D0WEcPQCXeXeTl7Y=; fh=a2o6Hwk52K8cqkKDPy4SEyN55IX2FdSHH2hiw24QO6c=; b=Qs+wfdmoS1tgZ/NHHbJcRS+uKE+pkMqyFfrXSKl7cdABklCLSnlVq2H/6M6vpCTiz9 AvT+oJVKKqnAvPChyszAw1NpJbWl8EZ9/x5h6NmFSv0EwpxpeZ9TMCls3dLNqW14WZNy 8fYcQ0aJNjU0NXx1YPsH98/88O6zXyx+rXtO9NssTvQC/7m1seclDqonqzLwg+gPvqSO V8wNIW7Z2++H9cxqA8PjDMB2zXM9GTVE4H6RFasWliO4SyJGbLJh6zaEf3JKL3zWBPEy PqYWH4bl4dZRK32mcoi4FRbu1V76ksZnTJIRuSwmDbzJyRzVyL/PtfxI1/WC0Ey4538W 0X/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yD0J6cbO; 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 d19-20020a05620a241300b0076f1f06b742si7117748qkn.522.2023.09.04.09.29.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:29:35 -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=yD0J6cbO; 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 1qdCRM-0001z7-7t; Mon, 04 Sep 2023 12:28:40 -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 1qdCRI-0001sw-TU for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:28:37 -0400 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCRG-0002Io-LE for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:28:36 -0400 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-50079d148aeso2721299e87.3 for ; Mon, 04 Sep 2023 09:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844912; x=1694449712; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wMO9Sabs/iEDm+ChlLb7bnpjmC8D0WEcPQCXeXeTl7Y=; b=yD0J6cbO1z/x2ouypxEh1jeG8paBFqI4kD5dngU9ByViGXxjB2HQpu4iEVMd0kc9Ay TJ7zdmD4PO7W/sEF97e7TCkqG7Q9+9+RgW1gyH65aKoC5h9G2FfGvA9vAHI9pAMgXdpv FM4ke3VDhNauxI5E1hI3AgH0jGGRlhB6Oc/omd+Ug1Kw8mBohGi1hBMVaeEBOKu6eytS 4oUFQALjmjWZ3DdHYZbtK6bT/kqDiIdKsQC0xgyJhEtGxrJRVaDPqnmoG7Zsfgn1jC5Q YIENWQCkMfhnAuWj3OgFifjxo7LBcBjYcxOJWsxXJ9Wuz1KAdaIH+EjNVfErXfN8bxB8 8JgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844912; x=1694449712; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wMO9Sabs/iEDm+ChlLb7bnpjmC8D0WEcPQCXeXeTl7Y=; b=lJdlaNZCwR1L3VLeMHO6ygtXm5t0rf+PvdDLBRGnmq5/L8vrcuY5BEgQ5dVQme40pv QL6/mRBm63V5LDZNFNc38B4q2BpTXdZzblpdhq+RC3jQXmp9vsc84mG+c+qrdoVbxz06 IdPUwhnq9MUnUqE5uJm7jIEYHX7nT5jQY7azaqCD/WPfM4witrOaAJfmAIEPg6/lHbbv lObJb69bZd31F/DI81OU/Pj6SQHdsKoRGAbxQbWu6S/o6rnTQDW+gy7Ex3VanuIWlRq8 l/47xsUSF0Xwaondk46ED2v0hvUMB3R8j+KMI/RLhWpDa8OwzKwIdkElbS7kyQrU2sNI HmiQ== X-Gm-Message-State: AOJu0YyG2zOU7kMfSemT7QA0UdMJ+n36AazmsyE5gkl+WnYZzlquxLm5 ojykrLKrkmh3P1qehMhYqqKS6obuCZx2hUSieMI= X-Received: by 2002:a05:6512:b08:b0:4fe:279b:7603 with SMTP id w8-20020a0565120b0800b004fe279b7603mr8729519lfu.14.1693844912164; Mon, 04 Sep 2023 09:28:32 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id d17-20020aa7ce11000000b00522572f323dsm6000348edv.16.2023.09.04.09.28.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:28:31 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Eduardo Habkost , Marcel Apfelbaum , Yanan Wang Subject: [PATCH 1/3] hw/core/machine: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:28:22 +0200 Message-ID: <20230904162824.85385-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904162824.85385-1-philmd@linaro.org> References: <20230904162824.85385-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=philmd@linaro.org; helo=mail-lf1-x131.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=unavailable 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: hw/core/machine.c: In function ‘machine_initfn’: hw/core/machine.c:1081:17: warning: declaration of ‘obj’ shadows a parameter [-Wshadow=compatible-local] 1081 | Object *obj = OBJECT(ms); | ^~~ hw/core/machine.c:1065:36: note: shadowed declaration is here 1065 | static void machine_initfn(Object *obj) | ~~~~~~~~^~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/core/machine.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index da699cf4e1..7adc3d4e13 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -1078,8 +1078,6 @@ static void machine_initfn(Object *obj) ms->maxram_size = mc->default_ram_size; if (mc->nvdimm_supported) { - Object *obj = OBJECT(ms); - ms->nvdimms_state = g_new0(NVDIMMState, 1); object_property_add_bool(obj, "nvdimm", machine_get_nvdimm, machine_set_nvdimm); From patchwork Mon Sep 4 16:28:23 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: 720005 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1694623wrh; Mon, 4 Sep 2023 09:29:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGi6VztzFb3YTSlp3DlSpMV2MVcwwfKfGs8DvFglgs1YbRK+My2Z74Gf95IO7YD0ik6y7Eh X-Received: by 2002:a05:620a:4687:b0:76e:f3a9:1e12 with SMTP id bq7-20020a05620a468700b0076ef3a91e12mr15309986qkb.1.1693844959106; Mon, 04 Sep 2023 09:29:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844959; cv=none; d=google.com; s=arc-20160816; b=CUGmtwXpU9nSuzenvOXGKkuT43Q6pqENAk0poqVP0smupUZnrfI5CVg/yx46pkWmXO sI0hlrbMXkfwyUKO6xU56I1ynoJvwF1ClFn9xKiAJtM2eYUzneOi+WrGuVSVVubSLeQS lniv75xHkRvDc4hHM2lTK/MLV+8pDYIVkR6Tuza3LDjqz0VgEOt40aYFOwalUNDuJzU/ rOSqihl2qUak2cpcDyImGopJSU3DXjUpbRCuUqfs1VfjaNL5z5rpajf2hZW6hkvwa4Es pSlorzVfarq7jljd5N1jOVvU2vjVVnXm1m7ZxRU4ln393WFdAn58WsYqSDe2WfuhaQcb UBDA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/gYF3UNN3lFc0Z73zh6TAcygqYQkjiaj790AQYKykAQ=; fh=Beq8HmRjTEPjpc7hnl1+lgL1Ts2uJq+tMwAeiaqV23U=; b=ZQNNzUsH9A95tEyyKXVF/1FFwjKVtbpmoRP/T6n0bv9c2Uien2rtEA/RIAxrSxdNe/ RaR6u1IL4WnJ5Qzrgj7UXVODwZi7lpZjumHwqHB4UeO9ukqk1p95D7qtW5969qKi/r7w nPPyJfJssfwezPHQqgSH1bREbyggly/Ugk4odM7mRmY0nQGJBxt0KzApkwM7G5tcrLrM Xm98Uy3sBt4wuTmJ6qDItRH++yMO+sHwawo052yh5qhFwy8HgfIv9c7zK0SdOTINXM3P WfVViuJ814I/am72/heBu0h1i4gATH4rcmuveUILmtjOIUuseBYoR7gLRvgS11C+uOIF yDEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=whs90MOB; 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 w28-20020a05620a0e9c00b0076d7d1c7f17si6660076qkm.526.2023.09.04.09.29.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:29:19 -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=whs90MOB; 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 1qdCRX-00025o-AL; Mon, 04 Sep 2023 12:28:51 -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 1qdCRO-00022k-Tj for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:28:42 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCRL-0002Ln-8s for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:28:42 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-52c74a2e8edso2368641a12.1 for ; Mon, 04 Sep 2023 09:28:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844917; x=1694449717; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/gYF3UNN3lFc0Z73zh6TAcygqYQkjiaj790AQYKykAQ=; b=whs90MOBGaBS40P1h/mz92M+WAyQhZ1Z5eVPjTxJu0GRFhsbq97Cbk/YDvlAG75CrI MoptHJkSfFIsDYDSix6KhjMi3tXKqEdqmCeeXXK+q7ZMJLRiWCJp3PFy8sT585epBamx /1EsYVpZatIUZMRWicAvuynYYBgqolZweQNdOU5ELM1ZL51kMZInnusJ22V+YKYk/Ovs CA5VR0Tu5DVZ1HXL0AXhMdsS9udqm/NlwDOJKnuX0wwLQknMuABRwWNpAF+q3FL7lskB G9NfeOw7v5YyguipwmDIRq1BZl0o310aPoL2WS5JLKA+fcd/ar4MtncAvbSiCvtAE66C CbBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844917; x=1694449717; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/gYF3UNN3lFc0Z73zh6TAcygqYQkjiaj790AQYKykAQ=; b=lZzMwc4g+j1YnquX6BeN9LKrKdgMVtwxGc/13TnodCt5+kfuJ+wep+A/bZX66+1TR/ iH+xGYCZG0eKBiRXvyu+FmqnT6NTmWCRAR2+9qp8/c70FIFEPxWjs6M2Jqm8tJ94CUOy oFXx7Dxl5GeKh3Rq/BVX0KrqSRmvW3XbkV4y5W/RFxS1HXxYqcj8Y9c2M6or4jCSvOji Im0X/fI+uOzllrfXltV1zFZ9vikffdcmnzZUa3abe5zGBjHLQexLtLMGxHfZJR+D4QSJ CoBIeN8MVluo1kr8HYuWCq/Tt3A5vYvkej/a/SHDTPf8ehLz9BVe4hiyrdzx7wq8Epic ADLg== X-Gm-Message-State: AOJu0YxbcH13kZbetBvUGW/WUU0pGnRb+CrIOXKbLLj57HyEYwpBTAzY LWFcQ7/55ub1GNK5f9R/9fH+CzZgG/F+52URtOw= X-Received: by 2002:aa7:d58f:0:b0:52b:d169:b374 with SMTP id r15-20020aa7d58f000000b0052bd169b374mr8715679edq.3.1693844917397; Mon, 04 Sep 2023 09:28:37 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id c20-20020aa7c994000000b0052a3c7c9e8bsm6037394edt.56.2023.09.04.09.28.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:28:37 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Mark Cave-Ayland Subject: [PATCH 2/3] hw/intc/openpic: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:28:23 +0200 Message-ID: <20230904162824.85385-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904162824.85385-1-philmd@linaro.org> References: <20230904162824.85385-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=philmd@linaro.org; helo=mail-ed1-x52e.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=unavailable 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: hw/intc/openpic.c: In function ‘openpic_gbl_write’: hw/intc/openpic.c:614:17: warning: declaration of ‘idx’ shadows a previous local [-Wshadow=compatible-local] 614 | int idx; | ^~~ hw/intc/openpic.c:568:9: note: shadowed declaration is here 568 | int idx; | ^~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/intc/openpic.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index c757adbe53..a6f91d4bcd 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -610,11 +610,8 @@ static void openpic_gbl_write(void *opaque, hwaddr addr, uint64_t val, case 0x10B0: case 0x10C0: case 0x10D0: - { - int idx; - idx = (addr - 0x10A0) >> 4; - write_IRQreg_ivpr(opp, opp->irq_ipi0 + idx, val); - } + idx = (addr - 0x10A0) >> 4; + write_IRQreg_ivpr(opp, opp->irq_ipi0 + idx, val); break; case 0x10E0: /* SPVE */ opp->spve = val & opp->vector_mask; From patchwork Mon Sep 4 16:28:24 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: 720007 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1694904wrh; Mon, 4 Sep 2023 09:30:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEB7twuhvO5Ly2N3uKb38L3t/PXMMz2G7rp2rMbqdHUScZLsNiTv8Xx/Gxh3R9u060ZvdAa X-Received: by 2002:a05:620a:469e:b0:76c:b468:2efe with SMTP id bq30-20020a05620a469e00b0076cb4682efemr18343048qkb.20.1693845000854; Mon, 04 Sep 2023 09:30:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693845000; cv=none; d=google.com; s=arc-20160816; b=unutHCfuDfzWeJ5xpEMtE+veiffJZRwtgMkzVwHEipRfAqslUdYs3diDzOdxsc5o1/ PDFfT4fWURjLqmOw/qQkZVybsGV7C37hD8YCNOAJGYsbxxe0A3tAfhQhXmGa/yvGMlk/ LBsowumcTO9PRFYBx9IGLPUnPYQcDCnUKAjI+wCpaLEc5CwSqlgHa7V53UTHC8w1pHLe 1DwybMi9dBFuG80g7BKt7ZgH1lzvSwMPCYwM/IAba0cI2hJSq/i4sCJg0BltacaCLOhy XI1g/9fUCvN3JLtbjqvA5nKNo3zKh+t1/aroCR9o9+D/fi2fWJn5+rs6jckHagN+EdJt Poyg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=V09dNf7wDwvKMqEpQRqfZrZ9Vsl+ZeGkw36NfyqmYlI=; fh=bbU1wDMlYTmPFyr4d/c/ai82BRsBWY7zQf4Pz5tNgPI=; b=BE5BSo6XlXhbdUNV8ErnZbhluWu81FYOTt9pTbZ4GkhEV3vVteCz18stbn20WznwHF IzGfaLhthTCSuw/gZ9q87id6MGROC445PZgjYOVgYtSWNcfDb7hUfuNU9orXAHFu6QHj bn2KRy6Qe0J7s4J94dYnVO25fqRfp3AdW0/cX8a6mEPk0z3Axe+Wy//SEoKDDoijHfa5 efz222iB3tXTzBu0ELZGcHmgfAix8lQpSBvn1asr2vkMfDHrV5+rpzisBmYsrBNMfdk+ g32NtlB6/E+aiezaav1QaMTSCzef8rBLtjemkB0t47KGBK+xkWWPLX/w15uEEigU5wp2 +47Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JB3t0H6G; 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 ro9-20020a05620a398900b0076541ed7f95si6406080qkn.9.2023.09.04.09.30.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:30:00 -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=JB3t0H6G; 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 1qdCRZ-0002N2-DE; Mon, 04 Sep 2023 12:28:53 -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 1qdCRW-0002D8-FO for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:28:51 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCRR-0002NC-M6 for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:28:49 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-52bcb8b199aso2171118a12.3 for ; Mon, 04 Sep 2023 09:28:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844923; x=1694449723; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=V09dNf7wDwvKMqEpQRqfZrZ9Vsl+ZeGkw36NfyqmYlI=; b=JB3t0H6GJVI0lR6dWsBAT2L22pH5WV5Qy9aQ3QsrMrUcOgyOJ1P1rmHSxJ0EAu38cJ dE2dwLmCPNtZKLNPiZ5k0QXdZGqI/TTZteWCeWhgBKy3/UB2p/k22Jhmkv/Xg6DvGMkm DYKk3DulgKqm1yvqXX4hXM9z5Fw9o5Ot4hCrDIqaURRAM70i45qLG+1eYvln0W8r68zY IqOftDvwucu0oJXMrUf03+tWQpPrTeNouMUi9bO9L3VXJ/vzaNUwLLClpLx3vpmos2ck vBRxYWxN/gYDnyONbkPKUU2S+tIySGU1e81SKgBW4Mm3oTTZ3fPdcbTI1WsrBd+rMqiN QWKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844923; x=1694449723; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V09dNf7wDwvKMqEpQRqfZrZ9Vsl+ZeGkw36NfyqmYlI=; b=CzZNXv+5F1Cg8qdVL0/2EIpTTIVHZ4/82t5Flvaj1pkMqCNb73hTo+FcedyjIyTS9/ HVfzbA30XgecY2HqS9XUGzOfhPFXR6Ew8gRko77hMuaA0rAb+jJHHJXuFUXYdwGxAMv8 5uSXPJ1+8xWpnT4ILkGHwRfCzcKSq8g0pS/yVq1GPJb/TZMmGzBJY/RbC8OC5MGG+UuQ yqEKkUNuHcR+t59DUzYAP+dBAuHhY3lPAyMMSSMAPlO7mDMK+UlT6y+nUyP+eOJ2cTxY vJfgpAcrmjcI1+Q16U+1LtJiKLywNRVmlFr+NKr3ZAbqjqnLS168V9zkkGUIzlvOjtGb N9Bw== X-Gm-Message-State: AOJu0YzrKoudSsXs4h3bhmSygD4pGHVXMdfixcgAhgXsRnGXC/YFA+KT K3Z/TuEIQyZm80XAUa96a3Gl00Rus3Mhjbil+YM= X-Received: by 2002:a17:906:224a:b0:9a4:88af:b77 with SMTP id 10-20020a170906224a00b009a488af0b77mr7963442ejr.60.1693844923230; Mon, 04 Sep 2023 09:28:43 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id ss20-20020a170907c01400b00993159ce075sm6356037ejc.210.2023.09.04.09.28.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:28:42 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Thomas Huth , Laurent Vivier , Paolo Bonzini Subject: [PATCH 3/3] tests/qtest/pflash: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:28:24 +0200 Message-ID: <20230904162824.85385-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904162824.85385-1-philmd@linaro.org> References: <20230904162824.85385-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.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=unavailable 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: tests/qtest/pflash-cfi02-test.c: In function ‘test_geometry’: tests/qtest/pflash-cfi02-test.c:409:22: warning: declaration of ‘byte_addr’ shadows a previous local [-Wshadow=compatible-local] 409 | uint64_t byte_addr = (uint64_t)i * c->sector_len[region]; | ^~~~~~~~~ tests/qtest/pflash-cfi02-test.c:342:14: note: shadowed declaration is here 342 | uint64_t byte_addr = 0; | ^~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- tests/qtest/pflash-cfi02-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/pflash-cfi02-test.c b/tests/qtest/pflash-cfi02-test.c index 0b52c2ca5c..8c073efcb4 100644 --- a/tests/qtest/pflash-cfi02-test.c +++ b/tests/qtest/pflash-cfi02-test.c @@ -406,7 +406,7 @@ static void test_geometry(const void *opaque) for (int region = 0; region < nb_erase_regions; ++region) { for (uint32_t i = 0; i < c->nb_blocs[region]; ++i) { - uint64_t byte_addr = (uint64_t)i * c->sector_len[region]; + byte_addr = (uint64_t)i * c->sector_len[region]; g_assert_cmphex(flash_read(c, byte_addr), ==, bank_mask(c)); } }