From patchwork Thu Aug 31 22:55:56 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: 719031 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741470wrn; Thu, 31 Aug 2023 15:57:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJtiRqMHpfN8cNe/bhIg3IZhTS9d5ooKftgKLqa9QAB/7NlZ7AadDGMOX2z9HJzHEWQeU5 X-Received: by 2002:a05:6358:9182:b0:13c:b1a4:3807 with SMTP id j2-20020a056358918200b0013cb1a43807mr698468rwa.14.1693522647561; Thu, 31 Aug 2023 15:57:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522647; cv=none; d=google.com; s=arc-20160816; b=GNbpUg3DQzMFr1q3z+tq0z5wiKw3QrXSdW5m9dwyzIHJC7QmXsBJn1APofNP1dRSUV KDID22p+Se7xiHLDYjMXM6fftl6ct45iTgDbOb3RJaKMfbVESQURp68DvwyAgQ41dqj2 Jbs8WnlYqkm5Alf4RBZ/s+gcF9JBPVQ4Sg+u/WtysJ5DIS1Y15kaqPIstihHJc96x7xp Ye+aTe2g7froZ/g3ByqSoiSlo3X+ipEsGmGJ0AxmPestbzYrdJNQ7OaxnCv9BJUa3uIw 0GV90Jy7U8LL4TtvI2nYzoZ2G5nWZnh0BDU9HsvvKrowuPYUCHdy0b4wBvOvBkSVGXeP eHJw== 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=IhXUeI4Vxb8/8XVWSOD9CuNhg7dP6BSEsnXwUzw0chc=; fh=6OUBJuTwrh/5tyWnzl0bHTkgdMQjhVAgG4QSR4yXIQg=; b=iEszwhFm/DRfaNNEEcxaLnqYzVV/k5VIuCux/01R6JegDI3MdwcNsZtjmJgeU90mUk OlJ6itjWi3AeCHT01CrDlieVK94A4obYaog6yL50iLBjurJp+Lxbt//IwGCYGAt++Z2N 4UX3M+KW2Wz70MshmVORHNzepG4BCq71KCZUMw5ubVTdDlx6ibf7rE8a6dMhdN6q4vjn GyyvMbGrCoNftCQmwhUOLIF+6ouiZp+JZeL/MgEIGp7D9q67FVeQi1yaRBrdZ89gHwQA enZ0atJJkRSIteUDhfma/LtNGBi4S/ZhtykMMKCQYRas5MtRiwdp+LkA1eCuGSNloAFz 5awA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h4TVqjCi; 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 t20-20020a05622a149400b0040fbc9a3257si1469179qtx.115.2023.08.31.15.57.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:57:27 -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=h4TVqjCi; 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 1qbqaO-0003sd-F6; Thu, 31 Aug 2023 18:56:24 -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 1qbqaM-0003rm-I1 for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:22 -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 1qbqaJ-0002ov-3F for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:22 -0400 Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-9a58dbd5daeso168500266b.2 for ; Thu, 31 Aug 2023 15:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522577; x=1694127377; 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=IhXUeI4Vxb8/8XVWSOD9CuNhg7dP6BSEsnXwUzw0chc=; b=h4TVqjCiUoPAAL9NKP3pvD8CJnd+kSGZwhjZW0ZJwZuKd02OwA4jhSQ/BUN36Ii4+e 4RWIenZyCI1HVxJgH9XKFlrSernhL8TchkYkYxGtYe0DlYKyICK542yoInGTssPbi9Lx NaPfDamMer6iTQm+Mxuc1ANT7GnA7VIO/ujcRJUqemWgIAvYzBRF14eLh7s91HvHxWol WCbCecqoJ+kZmqgRJKF2F4PZJNajN5phngIC1mtHuZmFT+1vT7LAOTcY0puK+L8S1i7e tf7vpqGm0N2NuAazW1ucrMOjhHnNgBdMBnLjT0ZIqjNpHooFwNMLiWimC7hjRbBDCd7y 12gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522577; x=1694127377; 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=IhXUeI4Vxb8/8XVWSOD9CuNhg7dP6BSEsnXwUzw0chc=; b=JMX/kMEmdi5lEW+DnwuzAPV/AaP9tLG0Sr/28Sk6F81VeMCy0e4h5U38c+nESXK9WU jONqRLrEsNf6TVgMlHJV4i1uhiKQFnGil/onpFh9leIWCP7M1Tg761S6hBi9KNyj3snP 5j5xgS2C+tejQOn3Jq+qtahnKGt37XXOGWAzU1YhQ2/Ri6Bzqa8EvpLh8PgXsopAQD29 +/f3SogOT+RsbMNQea8c0R70SgLXzxPXgyFKhE23GoLhnIe8lCg3dA66ckxBf+T9GPjm jEzrpg6E2Gqd8M4aKqaBOpKoZX+6U0/f4jzlVkLhCbmK+G0vBZKu5fQsKZFzbmqxdPVx XQ+A== X-Gm-Message-State: AOJu0YyxS8aeYlOgB8kDoT0b2NA/RIlOCGFWs+dvPBYRPqM7yZq4WDcl qVfIUEjzsvzjEWtbyaUuCTfG7ij3fnu/di9Y2uA= X-Received: by 2002:a17:907:75d7:b0:99e:39d:4fa7 with SMTP id jl23-20020a17090775d700b0099e039d4fa7mr507867ejc.22.1693522577289; Thu, 31 Aug 2023 15:56:17 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id m26-20020a170906259a00b0099ca4f61a8bsm1265876ejb.92.2023.08.31.15.56.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:56:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Paolo Bonzini Subject: [PATCH 01/11] tcg: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:55:56 +0200 Message-ID: <20230831225607.30829-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> 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=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: tcg/tcg.c:2551:27: error: declaration shadows a local variable [-Werror,-Wshadow] MemOp op = get_memop(oi); ^ tcg/tcg.c:2437:12: note: previous declaration is here TCGOp *op; ^ accel/tcg/tb-maint.c:245:18: error: declaration shadows a local variable [-Werror,-Wshadow] for (int i = 0; i < V_L2_SIZE; i++) { ^ accel/tcg/tb-maint.c:210:9: note: previous declaration is here int i; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/tcg/tb-maint.c | 3 +-- tcg/tcg.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/accel/tcg/tb-maint.c b/accel/tcg/tb-maint.c index c406b2f7b7..f1cf3ad736 100644 --- a/accel/tcg/tb-maint.c +++ b/accel/tcg/tb-maint.c @@ -207,13 +207,12 @@ static PageDesc *page_find_alloc(tb_page_addr_t index, bool alloc) { PageDesc *pd; void **lp; - int i; /* Level 1. Always allocated. */ lp = l1_map + ((index >> v_l1_shift) & (v_l1_size - 1)); /* Level 2..N-1. */ - for (i = v_l2_levels; i > 0; i--) { + for (int i = v_l2_levels; i > 0; i--) { void **p = qatomic_rcu_read(lp); if (p == NULL) { diff --git a/tcg/tcg.c b/tcg/tcg.c index 620dbe08da..46a3a231b8 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -2548,21 +2548,21 @@ static void tcg_dump_ops(TCGContext *s, FILE *f, bool have_prefs) { const char *s_al, *s_op, *s_at; MemOpIdx oi = op->args[k++]; - MemOp op = get_memop(oi); + MemOp o = get_memop(oi); unsigned ix = get_mmuidx(oi); - s_al = alignment_name[(op & MO_AMASK) >> MO_ASHIFT]; - s_op = ldst_name[op & (MO_BSWAP | MO_SSIZE)]; - s_at = atom_name[(op & MO_ATOM_MASK) >> MO_ATOM_SHIFT]; - op &= ~(MO_AMASK | MO_BSWAP | MO_SSIZE | MO_ATOM_MASK); + s_al = alignment_name[(o & MO_AMASK) >> MO_ASHIFT]; + s_op = ldst_name[o & (MO_BSWAP | MO_SSIZE)]; + s_at = atom_name[(o & MO_ATOM_MASK) >> MO_ATOM_SHIFT]; + o &= ~(MO_AMASK | MO_BSWAP | MO_SSIZE | MO_ATOM_MASK); /* If all fields are accounted for, print symbolically. */ - if (!op && s_al && s_op && s_at) { + if (!o && s_al && s_op && s_at) { col += ne_fprintf(f, ",%s%s%s,%u", s_at, s_al, s_op, ix); } else { - op = get_memop(oi); - col += ne_fprintf(f, ",$0x%x,%u", op, ix); + o = get_memop(oi); + col += ne_fprintf(f, ",$0x%x,%u", o, ix); } i = 1; } From patchwork Thu Aug 31 22:55:57 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: 719040 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741853wrn; Thu, 31 Aug 2023 15:58:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGhEbp2CntH3V5YMu3fpUYmcSjFb7fXy51gjG4J9QrlKlErRgl08NEYd5iFrTJJmgQEpXix X-Received: by 2002:a05:622a:4f:b0:412:2525:11a2 with SMTP id y15-20020a05622a004f00b00412252511a2mr1167995qtw.35.1693522731868; Thu, 31 Aug 2023 15:58:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522731; cv=none; d=google.com; s=arc-20160816; b=v5QchS4awCGNSN0BdtL7QUfWbYgff8lz5NkSa3VX7z79MqIJY6wCRn35+J1k8m1T7e 0a6Zu8plkcJAchhHp7HBTiT5nQSpuXIODl/SL9WBa/IFDqvlpzEf9SRakWnbxRvBcp4b jZX6sIGxSZ76Mv5TZAmVhR8ffBzvRrIQ6/zZ12DhHVi4wl7RlB8G2TjSUi9YXrC9yMTW eC9yLHAKOswNOfBvrYTwAkYEGNQf/sgse31E7FHFak2AUsuN0/S7hOilaFp2MiRD3eAM Uxx/N+XbVTsMK8BlRjzHVmCRaEM7PqRcepHIEJ5Yb8E9dR+98gc0borIXuU94jMbCm1+ sbgA== 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=kEesyLIbjrA7oeyx/iNQirg7zO4jKel4RvIBPMrDvkc=; fh=CMH4F3RZ59Ef3SLg0ppc7vxpUPvCiZChm09KUhwMALI=; b=Lmx3o+//cKRGAzIu5UwZ87X4QEcw4JnmJohm0oUQ7xOblbsCFJB1uYfm5jDEr+8AB5 1QUaNY7aJKXxWOULEce5aGo7u+W56TYlPC4twSKDSk4rRxYifxnArtkSt1c5iNiBdIGR 1/yy+tWNXxT6qLYW/FwkbCpsSO2ws/Oc1QNCqcc6u3R1XqhZIaBVk8vujcffG6rsMbaF IUfE50CeuTzqpgA0N1y8tZAbDy5Ngf9T32R60SOcqcv79KlboLAbZ07mfV2kKGjRwsUs T4qvHw25JBj6DoUfMnKXLbeI/e3G7WUK3obDTjfLQHo2hdV4DpLhp5Brn1JCrYuGFv/j huJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="F4jVEE/E"; 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 n10-20020a05622a11ca00b004084b9eeaf7si1514213qtk.357.2023.08.31.15.58.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:58:51 -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="F4jVEE/E"; 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 1qbqaV-0003uZ-8l; Thu, 31 Aug 2023 18:56:31 -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 1qbqaS-0003tO-Bu for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:28 -0400 Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqaP-0002q9-Bg for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:28 -0400 Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-99de884ad25so168094966b.3 for ; Thu, 31 Aug 2023 15:56:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522584; x=1694127384; 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=kEesyLIbjrA7oeyx/iNQirg7zO4jKel4RvIBPMrDvkc=; b=F4jVEE/EC9e8pVSN7jp1DFlKqcEYCPgMMV8Kt3Y42JeEYljU7v5fkFy1wY1OVuYPUD YKLN4EOH6ZU4dwVr7wd7qY4HE2FkSJFDnQRx2+rmtiFxKlJME2wen2Y+TujK5dqgizcn 5CwB/dN/lfSgqGIhhLtJurGa4CIwVf3p7tlH+XY1E10DxCl4P4k1yXTdYu2sPqDl4pQm o8lSsoy+wip0ruywOYrEpYLTJoAl2Ydi98FSsp3V9PrkQJtPGhmL2rcTd7nOGzbfVU81 xt21lZT6yPV64kUaU9cRnvfDHz6rd5LoSDnoapxICq3wwXFDcWU0Nwx0X92Pg8yYZUDy /gMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522584; x=1694127384; 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=kEesyLIbjrA7oeyx/iNQirg7zO4jKel4RvIBPMrDvkc=; b=FNK8wuZ7eknYlVywArFbJCKNHsvL3y7tsow4SDxtQ3rz65bXB6vD/JPVsGjInIjBtF p3LQFrjJ70N0+FcvluFWOyU9ume0B8qgVXlPTk0RwjYuycraQRJwrazywnhlEVqKEN+C xISyv7zEoz9xfqzmuFgag8m26wCJcGJs2bxMml8UxvZPxXv5vVJnGcykaEGUizsCAabW iA66OBtjf3WKCAlGTsOUXz7mvXLHSKzs312hcE49BXYwp4ZCqEjMMRpTDhkwgMHY3To/ iYnlD4icV918XGNbrzA9/TzZgEwX/kGswfASb5i7iWpm+I9190MUwFZnZ7X1EWGYpDEI cLhA== X-Gm-Message-State: AOJu0Yzl4riqE7sEJq9x/BGkMyM3cCw2Cv+Ker622l8ryd1mCj+so1O3 qE43JiWDblrg2+DfgU4YLW5lTcU09oYhFQYkdKU= X-Received: by 2002:a17:906:224b:b0:9a1:bee8:9252 with SMTP id 11-20020a170906224b00b009a1bee89252mr542069ejr.29.1693522583206; Thu, 31 Aug 2023 15:56:23 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id jw26-20020a17090776ba00b00982a92a849asm1252665ejc.91.2023.08.31.15.56.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:56:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Alexander Graf , Peter Maydell Subject: [PATCH 02/11] target/arm: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:55:57 +0200 Message-ID: <20230831225607.30829-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=philmd@linaro.org; helo=mail-ej1-x62c.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: target/arm/tcg/translate-m-nocp.c:509:18: error: declaration shadows a local variable [-Werror,-Wshadow] TCGv_i32 tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]); ^ target/arm/tcg/translate-m-nocp.c:433:14: note: previous declaration is here TCGv_i32 tmp; ^ target/arm/tcg/mve_helper.c:2463:17: error: declaration shadows a local variable [-Werror,-Wshadow] int64_t extval = sextract64(src << shift, 0, 48); ^ target/arm/tcg/mve_helper.c:2443:18: note: previous declaration is here int64_t val, extval; ^ target/arm/hvf/hvf.c:1936:13: error: declaration shadows a local variable [-Werror,-Wshadow] int ret = 0; ^ target/arm/hvf/hvf.c:1807:9: note: previous declaration is here int ret; ^ Signed-off-by: Philippe Mathieu-Daudé --- target/arm/hvf/hvf.c | 1 - target/arm/tcg/mve_helper.c | 8 ++++---- target/arm/tcg/translate-m-nocp.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 486f90be1d..20d534faef 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1933,7 +1933,6 @@ int hvf_vcpu_exec(CPUState *cpu) uint32_t rt = (syndrome >> 5) & 0x1f; uint32_t reg = syndrome & SYSREG_MASK; uint64_t val; - int ret = 0; if (isread) { ret = hvf_sysreg_read(cpu, reg, rt); diff --git a/target/arm/tcg/mve_helper.c b/target/arm/tcg/mve_helper.c index 403b345ea3..32087b6f0a 100644 --- a/target/arm/tcg/mve_helper.c +++ b/target/arm/tcg/mve_helper.c @@ -924,8 +924,8 @@ DO_1OP_IMM(vorri, DO_ORRI) bool qc = false; \ for (e = 0; e < 16 / ESIZE; e++, mask >>= ESIZE) { \ bool sat = false; \ - TYPE r = FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat); \ - mergemask(&d[H##ESIZE(e)], r, mask); \ + TYPE r_ = FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat); \ + mergemask(&d[H##ESIZE(e)], r_, mask); \ qc |= sat & mask & 1; \ } \ if (qc) { \ @@ -2460,7 +2460,7 @@ static inline int64_t do_sqrshl48_d(int64_t src, int64_t shift, return extval; } } else if (shift < 48) { - int64_t extval = sextract64(src << shift, 0, 48); + extval = sextract64(src << shift, 0, 48); if (!sat || src == (extval >> shift)) { return extval; } @@ -2492,7 +2492,7 @@ static inline uint64_t do_uqrshl48_d(uint64_t src, int64_t shift, return extval; } } else if (shift < 48) { - uint64_t extval = extract64(src << shift, 0, 48); + extval = extract64(src << shift, 0, 48); if (!sat || src == (extval >> shift)) { return extval; } diff --git a/target/arm/tcg/translate-m-nocp.c b/target/arm/tcg/translate-m-nocp.c index 33f6478bb9..42308c4db5 100644 --- a/target/arm/tcg/translate-m-nocp.c +++ b/target/arm/tcg/translate-m-nocp.c @@ -506,7 +506,7 @@ static bool gen_M_fp_sysreg_read(DisasContext *s, int regno, gen_branch_fpInactive(s, TCG_COND_EQ, lab_active); /* fpInactive case: reads as FPDSCR_NS */ - TCGv_i32 tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]); + tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]); storefn(s, opaque, tmp, true); lab_end = gen_new_label(); tcg_gen_br(lab_end); From patchwork Thu Aug 31 22:55:58 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: 719030 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741469wrn; Thu, 31 Aug 2023 15:57:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGyWFnuSZuUkQmaWvHv5ixmFYj1T3jBWmzAsGn3b7W9PFJ4W/It9agsHjHmUweMKkrvQVpy X-Received: by 2002:a05:6358:7f1c:b0:13a:cb52:4832 with SMTP id p28-20020a0563587f1c00b0013acb524832mr690544rwn.23.1693522647558; Thu, 31 Aug 2023 15:57:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522647; cv=none; d=google.com; s=arc-20160816; b=s1BSVNiB+iHNM0TKZYAy/NZI+BEPSAivdb0aacrLYfia/pn8Cx6e30m5mBeLyXpFDC wnBGwpN6KFmj7YGQHblMTINNRs4a8lqkRuL6tdG9dHntHEAhorBwjdFHYjoEkwnchdmy la3WBwV/HLNdRz3Y/iTvKUtENgfQwz0tnaxvRNKFpr+5UD5Rxgi7S8NKOm0o+GXSJW9J vVVTgLqycYKmyHWS1aTeLa0wRvPtocAJC6bJh0xXh0pQf6KNr5sNjmtnwv2yUqou0eF7 YpppraIef+JfozS3qUAZnfQ7XnmlVamRc3ZptR0iafdqWMVPcRYDg5rXIR0BXdOKMOFt 6MyA== 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=Qu4c9RFtBaI++TDfUfro9qCLzzwcVfWMk2RIqvZtG8c=; fh=7PFit5CQEoRTxJAteJl+Ot/K6xlaybd7DKjcYZSUX/Y=; b=xstE8H70eikTQ8Cm+swZ960rDOgyO11encuTD+nL8Y8mwK8t58v1yHhOgO2gSIBtaC BiLxPy3z5nMKJBsL1QcSrDVwTuWlQY0rDXy/cKQcnFSJH/eOalml4EV8fbBL7kve2lmP JlPSVH6UfI7gQUlp6kGC8zj/LrENQ8IE+2pATjyfUASULe9DNrYXO0yid392WmxM2HJ7 ZKfnspNTA5Xtir4/p8a1l4noVu4FB0jtSarD37Aw5tWmk14TM2WUMwTeHizA5Ijxqy7F sdknDuHP+JqMYgIoO3Q49EUUTu5BQcyya69lHKk+BG8xlOdEJdOBqmbqdgr3560SUCu1 wnlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GTfYsgqo; 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 e18-20020ac84e52000000b0040551c533e2si1469478qtw.424.2023.08.31.15.57.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:57:27 -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=GTfYsgqo; 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 1qbqaf-0003w1-1h; Thu, 31 Aug 2023 18:56: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 1qbqaZ-0003vV-MX for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:36 -0400 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqaV-0002rA-OP for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:35 -0400 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b9c907bc68so24071511fa.2 for ; Thu, 31 Aug 2023 15:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522589; x=1694127389; 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=Qu4c9RFtBaI++TDfUfro9qCLzzwcVfWMk2RIqvZtG8c=; b=GTfYsgqo7ijh+8jeEQAnVC3XyjzS8eBS3JPUxKmtWU4J0AG/axnP8xLvWJgRYCZ8uT sQ0Wlz7kIQZoYTNXE55CsxEuKxDqDBenvJStG2Pl46QEcsENwV3ZdqP041Z1bO7Bn59D BdTVsUwSrCu6UlB4KmnHcF7PYdI8higLijkeFmSe3ZTStX7LGNmvDvXcH3LM/HXqd9AW RyOniZM2qchb+eqRVXPHV285ZK5q7Vd729AJkm0e9X5Lnc0zLOHkdZLwcubsb1DbqMzt 2UxuHw0LfH/CbTm2UOBYyCwonzlxRzpOjI29AwqYXkN7J8RAHwlFEuoMZiKYzjJSn5GV 8Ezw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522589; x=1694127389; 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=Qu4c9RFtBaI++TDfUfro9qCLzzwcVfWMk2RIqvZtG8c=; b=Guph8hvurGhxx5j/UFtPvLrDzuLnuxUErNVgageNzYWuhlY7VuawyOntAOv3+ymQQM qeKWobFHl1bU3oPSe6jVek62/No/gqSOOb6468WGRJLs+Ihvj1OYqWCGdZ2txSCKAM+I zUgHBT+3hS989qXvlyVGfHUjTbJldppQtbvY7xpHVP/uBE/rpeOLMabcX/m9LF1oWlya UQbKkZTJ+iH/DxKnRp+2pdRn2O5266ItJ4eDaImnvJqODcP3/8M6YgJvgoYGvQPhts02 s+O9kHlUzRotCA2NA8QoWthM5/eb6IaxLAlXSvbqWzSjGw5IWmIiKpZalXLP6oUU5G+Q +AYA== X-Gm-Message-State: AOJu0YzyHOy7pU02R11pdBhRJoBjMRf9+BBuSa1Er0M7EpmqauKjH6YX 5B0QUt0myFZabM4W0ig0HLNWvJNzKQS3/v5Gw1U= X-Received: by 2002:a05:6512:33d5:b0:4f8:631b:bf77 with SMTP id d21-20020a05651233d500b004f8631bbf77mr513403lfg.22.1693522589028; Thu, 31 Aug 2023 15:56:29 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id j4-20020aa7c0c4000000b005232e637c24sm1302592edp.84.2023.08.31.15.56.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:56:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PATCH 03/11] target/mips: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:55:58 +0200 Message-ID: <20230831225607.30829-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.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: target/mips/tcg/nanomips_translate.c.inc:4410:33: error: declaration shadows a local variable [-Werror,-Wshadow] int32_t imm = extract32(ctx->opcode, 1, 13) | ^ target/mips/tcg/nanomips_translate.c.inc:3577:9: note: previous declaration is here int imm; ^ target/mips/tcg/translate.c:15578:19: error: declaration shadows a local variable [-Werror,-Wshadow] for (unsigned i = 1; i < 32; i++) { ^ target/mips/tcg/translate.c:15567:9: note: previous declaration is here int i; ^ target/mips/tcg/msa_helper.c:7478:13: error: declaration shadows a local variable [-Werror,-Wshadow] MSA_FLOAT_MAXOP(pwx->w[0], min, pws->w[0], pws->w[0], 32); ^ target/mips/tcg/msa_helper.c:7434:23: note: expanded from macro 'MSA_FLOAT_MAXOP' float_status *status = &env->active_tc.msa_fp_status; ^ Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/msa_helper.c | 8 ++++---- target/mips/tcg/translate.c | 8 +++----- target/mips/tcg/nanomips_translate.c.inc | 6 +++--- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/target/mips/tcg/msa_helper.c b/target/mips/tcg/msa_helper.c index 29b31d70fe..391a5fca26 100644 --- a/target/mips/tcg/msa_helper.c +++ b/target/mips/tcg/msa_helper.c @@ -7431,15 +7431,15 @@ void helper_msa_ftq_df(CPUMIPSState *env, uint32_t df, uint32_t wd, #define MSA_FLOAT_MAXOP(DEST, OP, ARG1, ARG2, BITS) \ do { \ - float_status *status = &env->active_tc.msa_fp_status; \ + float_status *status_ = &env->active_tc.msa_fp_status; \ int c; \ \ - set_float_exception_flags(0, status); \ - DEST = float ## BITS ## _ ## OP(ARG1, ARG2, status); \ + set_float_exception_flags(0, status_); \ + DEST = float ## BITS ## _ ## OP(ARG1, ARG2, status_); \ c = update_msacsr(env, 0, 0); \ \ if (get_enabled_exceptions(env, c)) { \ - DEST = ((FLOAT_SNAN ## BITS(status) >> 6) << 6) | c; \ + DEST = ((FLOAT_SNAN ## BITS(status_) >> 6) << 6) | c; \ } \ } while (0) diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 9bb40f1849..26d741d960 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -15564,10 +15564,8 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int *max_insns, void mips_tcg_init(void) { - int i; - cpu_gpr[0] = NULL; - for (i = 1; i < 32; i++) + for (unsigned i = 1; i < 32; i++) cpu_gpr[i] = tcg_global_mem_new(cpu_env, offsetof(CPUMIPSState, active_tc.gpr[i]), @@ -15584,7 +15582,7 @@ void mips_tcg_init(void) rname); } #endif /* !TARGET_MIPS64 */ - for (i = 0; i < 32; i++) { + for (unsigned i = 0; i < 32; i++) { int off = offsetof(CPUMIPSState, active_fpu.fpr[i].wr.d[0]); fpu_f64[i] = tcg_global_mem_new_i64(cpu_env, off, fregnames[i]); @@ -15592,7 +15590,7 @@ void mips_tcg_init(void) msa_translate_init(); cpu_PC = tcg_global_mem_new(cpu_env, offsetof(CPUMIPSState, active_tc.PC), "PC"); - for (i = 0; i < MIPS_DSP_ACC; i++) { + for (unsigned i = 0; i < MIPS_DSP_ACC; i++) { cpu_HI[i] = tcg_global_mem_new(cpu_env, offsetof(CPUMIPSState, active_tc.HI[i]), regnames_HI[i]); diff --git a/target/mips/tcg/nanomips_translate.c.inc b/target/mips/tcg/nanomips_translate.c.inc index a98dde0d2e..d81a7c2d11 100644 --- a/target/mips/tcg/nanomips_translate.c.inc +++ b/target/mips/tcg/nanomips_translate.c.inc @@ -4407,8 +4407,8 @@ static int decode_nanomips_32_48_opc(CPUMIPSState *env, DisasContext *ctx) case NM_BPOSGE32C: check_dsp_r3(ctx); { - int32_t imm = extract32(ctx->opcode, 1, 13) | - extract32(ctx->opcode, 0, 1) << 13; + imm = extract32(ctx->opcode, 1, 13) + | extract32(ctx->opcode, 0, 1) << 13; gen_compute_branch_nm(ctx, OPC_BPOSGE32, 4, -1, -2, imm << 1); @@ -4635,7 +4635,7 @@ static int decode_isa_nanomips(CPUMIPSState *env, DisasContext *ctx) break; case NM_LI16: { - int imm = extract32(ctx->opcode, 0, 7); + imm = extract32(ctx->opcode, 0, 7); imm = (imm == 0x7f ? -1 : imm); if (rt != 0) { tcg_gen_movi_tl(cpu_gpr[rt], imm); From patchwork Thu Aug 31 22:55:59 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: 719034 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741674wrn; Thu, 31 Aug 2023 15:58:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErcykybPM/hRkozCfEZlZ9z+Dt4IqKS+oGhyUSNKXTOeRYJvQIy0VfveHzm5jwy1vA4xxR X-Received: by 2002:a1f:ed43:0:b0:48f:895f:45da with SMTP id l64-20020a1fed43000000b0048f895f45damr1033770vkh.14.1693522689419; Thu, 31 Aug 2023 15:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522689; cv=none; d=google.com; s=arc-20160816; b=o7f4IUs97/QuMnqKghmK3H7XfCbHRR47n++DIPhxSDZM5nm2fmd7StffK8mCrBqTCi TA3CG/GzD63dtAF+4UazkfisUYfXhutm8aIjAL5GhLMCLz4R/L1xQ+FtRUxolEYex+3q LNTQmViwdm1Dc1yg9y+9LO0zbO/oHGJwdY0OmKvSoN6pJ+xqlGHjLzkrr9UUrgKs8dUH dRFnCv5EQ3Awd8c2FtZLKKlZS9Y7wabSOvKvVMWAzWnnRhHcny1ZHbENBBfYRMmQIahT KS5jV2mE8KL91mg26EjITCQfeMOoHebuuvhFKyrFFks+CPPrwFz0fw+2RJPCqhZF3wFt GiZg== 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=ShDkJ51FeoYcA6aYanaU3KOqVTFkyRgkJb5MAXD0rZI=; fh=idq1fxLttOtnmCkDPrxdp99bvZG1Jl1KEDnEWAr8dSM=; b=ez3T7YODl2fOHVQKN+q9vEAZNZUGPWEpSbhLcLK7g1x4oc2pDCjqbVkiYOq6BOlewp oN30NwZxJbbQEtLSu2hKtXZlJa7ZwjjW9Xp6fF/N2fMmrKUj0n0/0leomXgcrSJE/ak8 u90yjCjTfdokgrDeRn5qeA90nQMH1ZVHyzZaVxVZYtdQPWebtvuj23DwlRYyuAGXTChM BozZr0zIwY25FjP3KLue3XbpPeVkKPGx3yamqdzQxL3BNk83t7KF94D5U1nCwyqtYJjO XUGfI7nEA77m+f4H6c+aSd0H3kpkEeu096HK4gLGkogsi+cTqKwqo1vE5Drbm8shewY2 gZwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rP6iY1Va; 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 j13-20020ac85c4d000000b004136cb7caadsi1470153qtj.577.2023.08.31.15.58.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:58:09 -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=rP6iY1Va; 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 1qbqap-00040A-8O; Thu, 31 Aug 2023 18:56: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 1qbqae-0003xH-6z for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:40 -0400 Received: from mail-lj1-x232.google.com ([2a00:1450:4864:20::232]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqaa-0002ry-E9 for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:39 -0400 Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2b9338e4695so23353201fa.2 for ; Thu, 31 Aug 2023 15:56:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522594; x=1694127394; 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=ShDkJ51FeoYcA6aYanaU3KOqVTFkyRgkJb5MAXD0rZI=; b=rP6iY1Va9Un1QM7mD9DWUVBYvra3Nizhyv0/DmBu2wSx5SYlss4UaRAdKoFO8J6mo5 XnyvnRAAZw4oRludrX/uAfN6ZSjFbV5F+ZFEf9z38wPG2yrBCtClu+99HLha4F47RfAc YYJGiTYpSmZqfsjAZwp0CGQeb/zgrK1nHR7h/qy84+F3VwblO8e1YU/WMO8DUmjVIuMc 7M7vadZqw3FkMCpWkqmCohb1UxyepBIlq4Xhs6//SdBKZyg2MMmf2HIBGmKkpP8rTOTK oiBTuQUTbyeMb5ow0pQup6gChTzpEcLfgSXdZF3EOEy9Ukj3X6Ayl3aJZv5LR6xipqKx Ue8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522594; x=1694127394; 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=ShDkJ51FeoYcA6aYanaU3KOqVTFkyRgkJb5MAXD0rZI=; b=KwcX6tSKbsLGp7SY8ndj7NOuYdaZFD8Pn/KnxrcKUrkLUXAurG3HTWm56r+eXvyawU WIRTYOAZVzRgWuPdFucakmKG8MXZlu/4COwej4WZ3a2ee1222i3DPlTeBbjKtQ96VSl1 AUmJI3fcm+w/zZQ28AUfa6+28zzBWdPks7PXy5CQoFHrlC9inbVzlDNMxq7smvIgWcXX Nr169UT42P6CcSCJM4gTnEm5KsxVdQrxfapXnYHC/IckrK0sHJR3+0W0UDU7qU6EqiHu ObX5wsgQSlGNsdB6vcXMlWnelpGU3e40DZrDxhAXB60L/DHnwIexJuFSTqX0qGXvDzfn baIg== X-Gm-Message-State: AOJu0Yw5Rtu11vg01xmjoAnRNmgh5FHA1D6KW3K1Q6482HfVXkb1tz14 1No9xy8UH5BMsWhib7sCiHJVfhd/kcyhQBKQ4SY= X-Received: by 2002:a2e:a176:0:b0:2b6:a804:4cc with SMTP id u22-20020a2ea176000000b002b6a80404ccmr414028ljl.53.1693522594650; Thu, 31 Aug 2023 15:56:34 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id v7-20020a1709063bc700b0099bc80d5575sm1223528ejf.200.2023.08.31.15.56.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:56:34 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Laurent Vivier Subject: [PATCH 04/11] target/m68k: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:55:59 +0200 Message-ID: <20230831225607.30829-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::232; envelope-from=philmd@linaro.org; helo=mail-lj1-x232.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: target/m68k/translate.c:828:18: error: declaration shadows a local variable [-Werror,-Wshadow] TCGv tmp = tcg_temp_new(); ^ target/m68k/translate.c:801:15: note: previous declaration is here TCGv reg, tmp, result; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- target/m68k/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/m68k/translate.c b/target/m68k/translate.c index 15b3701b8f..f69ae0e3b0 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c @@ -825,7 +825,7 @@ static TCGv gen_ea_mode(CPUM68KState *env, DisasContext *s, int mode, int reg0, reg = get_areg(s, reg0); result = gen_ldst(s, opsize, reg, val, what, index); if (what == EA_STORE || !addrp) { - TCGv tmp = tcg_temp_new(); + tmp = tcg_temp_new(); if (reg0 == 7 && opsize == OS_BYTE && m68k_feature(s->env, M68K_FEATURE_M68K)) { tcg_gen_addi_i32(tmp, reg, 2); From patchwork Thu Aug 31 22:56:00 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: 719037 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741823wrn; Thu, 31 Aug 2023 15:58:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJlugFrUuXzTdekUPoZihsF8ebjdmr/619VRZZNXKS1UzASfkf7WHG+GaRckQXWzRzNChb X-Received: by 2002:a05:620a:198f:b0:76d:b0c3:5aff with SMTP id bm15-20020a05620a198f00b0076db0c35affmr971399qkb.74.1693522723626; Thu, 31 Aug 2023 15:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522723; cv=none; d=google.com; s=arc-20160816; b=fmAZhV4OXBSUR23WHT4IhMBSIUR47vzm3N6ICgqHH6gW7f40f/FX0dm/3yATln0l+e Rpx6TcKiPJbs4Rhdu8OuU08a+Q4WtFezqCIW+jHa8oLqvUCFBeEBcxa97r25HUaUfpUA xbm959Tkehvxzcm0/ugXDTxmljowarR3e8DXRmavj+NNX2a//zk0ZjrFNtR/bbryeQN+ D7kRVlfZgJVcfbQCD1zYicvbDsQZJ7HJAS279HRKKGmjO6IGd10+b43e3vbkL3SaPfeR L77if439wNdv9LDmuhsPUSM1ejPDHPNg14YTt1q5LK26nig50gysUFVzuIoLxymlIRLr QY2w== 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=PQQ92YswPrJjLh8GJHh2K0OTvyaJRT2v7+qtQtVGLSE=; fh=CBl7qg6Xhfzjse9V+dxyNEdr3C/AYoRggW/zcQwfpDs=; b=c62zhxmtyBw98WnAQ3MIdNYSe6s9eDHK56tzmdBMw6OM/MbRLQsOpv1K49Ij3MTeFb DJjPzPAYhq4DQgyW2nhTbB14ZO1TY+xsZc4ILryIgd3UzCohFiAgFSxnSXBVpVLJwenB Rx3BXtT7DIEaFkJvr8EPWQCdx4EmpGVfNr9b9UlkptGn0MT9dNQ5Xk00JPCGqs28tRzW ldv4mPIZ8FinvHi7/Zdl/bT+4xZ6eJxGbRxv1yu+xYcBq6vhxilt4bNXrUpBo4iqZ+1p aDIAeXUEGI/ilObPyiSGiCe42zyOITPgUmeojdM4aoHxR1UD+tKbd+SXzsHyDVeN/wo/ c30Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=volQLzVT; 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 qs12-20020a05620a394c00b0076d512665e0si1624766qkn.47.2023.08.31.15.58.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:58:43 -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=volQLzVT; 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 1qbqap-00040B-8X; Thu, 31 Aug 2023 18:56: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 1qbqaj-0003ya-Gr for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:45 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqah-0002su-73 for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:45 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9a5e1812378so157777566b.2 for ; Thu, 31 Aug 2023 15:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522600; x=1694127400; 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=PQQ92YswPrJjLh8GJHh2K0OTvyaJRT2v7+qtQtVGLSE=; b=volQLzVT7NPtC6xojkdLJGx+wzd1RhzBa0sD7ExXP9huapP61zVcVYxu3kXCpqntiK U4M1jrWh5lphCRLly1h7XciVYBC0yznfylycrBMR8fLDKxcXPpxzfJsh8VZMApYETKVe cqIU8QPf4y63PLecbN+KPLMsTmCqOLCXDuOSt4FL2uP1sqMxgSF0o2x1pdSqcMNptGcn xu/DdFzhlCGU/P+/vEJqSUh9DGF43162II2zf/tylgvmclfjAjhCtlg7mhFuUHxzsdHO kEiQx38K4XS7kJes0g4839HGF+AnmETOHw+bigPlJO02EcIeE8VBbIrKYNmqfO/WvL8b I+0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522600; x=1694127400; 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=PQQ92YswPrJjLh8GJHh2K0OTvyaJRT2v7+qtQtVGLSE=; b=HFUoofylk1GtyV5B4ra43Fb/iPX6g7b1NbEvNk/BQDLwVShcsKeDgpUt6aYrZFVuwt 2cSrvOghY1dAKEO/BiLErjhWDfMQyOGi4+MfSjCouuCA0zVMoLXC6mEetV4wDUVoqNUM 2K4/v3osb9NJgZm8bHMaXKbYyPk73ckpIBsrHy7fYVHYHMt9fhiPR4sNtnA8vAsrjzJW kY9Aa89vPySOq5Q/1gXrZZ90PRVMbsbo65HaHznGr/TwrK0QaFAJPPuU0i70IDyauFVM KHF/Y9hygq32O3qgIkAoF1ONNIT86auFrCdpM/0bwDBDDBcxnoCtjh9AOT2T07hiM5bE Sjhw== X-Gm-Message-State: AOJu0Yyn99ydUOMnIsZXxTXnKMpQPrOUhdnvC3zbEQaXPK79WWsJckVD ZfnKdohONFFCFGxFGJswvfjHoYXkmbIszoMeDe4= X-Received: by 2002:a17:907:2ce7:b0:9a1:bb8f:17d7 with SMTP id hz7-20020a1709072ce700b009a1bb8f17d7mr463648ejc.12.1693522600451; Thu, 31 Aug 2023 15:56:40 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id s13-20020a1709064d8d00b0099bca8b9a31sm1240738eju.100.2023.08.31.15.56.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:56:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Peter Maydell Subject: [PATCH 05/11] hw/arm/virt: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:56:00 +0200 Message-ID: <20230831225607.30829-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=philmd@linaro.org; helo=mail-ej1-x632.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: hw/arm/virt.c:821:22: error: declaration shadows a local variable [-Werror,-Wshadow] qemu_irq irq = qdev_get_gpio_in(vms->gic, ^ hw/arm/virt.c:803:13: note: previous declaration is here int irq; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/arm/virt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a13c658bbf..32a964b572 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -800,7 +800,6 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem) for (i = 0; i < smp_cpus; i++) { DeviceState *cpudev = DEVICE(qemu_get_cpu(i)); int ppibase = NUM_IRQS + i * GIC_INTERNAL + GIC_NR_SGIS; - int irq; /* Mapping from the output timer irq lines from the CPU to the * GIC PPI inputs we use for the virt board. */ @@ -811,7 +810,7 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem) [GTIMER_SEC] = ARCH_TIMER_S_EL1_IRQ, }; - for (irq = 0; irq < ARRAY_SIZE(timer_irq); irq++) { + for (unsigned irq = 0; irq < ARRAY_SIZE(timer_irq); irq++) { qdev_connect_gpio_out(cpudev, irq, qdev_get_gpio_in(vms->gic, ppibase + timer_irq[irq])); From patchwork Thu Aug 31 22:56:01 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: 719033 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741584wrn; Thu, 31 Aug 2023 15:57:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHgqp3btAC5ogm1uCpUf4PjMxNTUsAxusUxAU+NBzYh5hJFGWgYQ/d7lLnn8SbfZhN2Vo0P X-Received: by 2002:a0c:da93:0:b0:641:8878:29a6 with SMTP id z19-20020a0cda93000000b00641887829a6mr645896qvj.65.1693522670624; Thu, 31 Aug 2023 15:57:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522670; cv=none; d=google.com; s=arc-20160816; b=O7C1mY1UPiiyFg5Bl9i5vKwOl6x31Bp9H0XwbRVESOb5eZZdKTGhq9aVf3d5Xfh15U wHM/rvS2BYFWeaw9KNn6WhyZzursgk+Kf+D6VBNSFt8jLY9xanfQC07rUS0D2vEwCU2e 7Jdoq3QudvjSh7+M23v/fDOAPUB/qns75aNi3UcwqXgUUfIyy7NJsvS/uvrVAk66lWlu b9NRaBbFBRC7GlcKGjE42leJt14wHhcXX3gjDEd7QF/dtOWG+PJczMOmPT+7ewtZJTai RsYcwZhPiiBwWfQyFx76ziiUDdPsicMGkn2x23zYa4xPV0hNdsJb38FStruO+vKb17Zq tWuw== 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=YH1ZsJfL6odLNAdY06q9TX6w45RtA1ESU5uhuRXFuvE=; fh=A08pzt7tFDng4dMuda6EQbX7ZokwbpVz0mNhIbO+ujY=; b=mivp43YIe2HhMFlgu3wKyvPUR8N4iKenRdIqRdv/wUXX9MBto2/YQd/vcMv/6p04CC bQKwIzWYwnJsVmohg9xprJp0QRZKm5VGwlfPEWalh1u9ktFbzP20Fb36l9izwN2I9Ev8 2xMU89Mj22kqDmRDTqlw/rzodHAIttjHwH2vPIoRrTYsJ1vsXWslw1t83CvloLNAovHD X4p/2ngz8t5KvY9Uryfz3gHRhuUOHUdeEtfDhgL12DaMdnb7PJbskA2Bei3QLaEIOVND 3NVD1RC98kP88GsCYCC4zKe70kzBNYFvuNXtJ/yp5A8K2XO0A2AJXpdKT257b7aq2KuE 7y9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GfTNNTLC; 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 k3-20020a0cf583000000b0064bfdf0489esi1544865qvm.606.2023.08.31.15.57.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:57:50 -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=GfTNNTLC; 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 1qbqas-00042R-FT; Thu, 31 Aug 2023 18:56:54 -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 1qbqap-00040y-UL for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:52 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqam-0002wG-1o for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:51 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3fee8af9cb9so13986155e9.1 for ; Thu, 31 Aug 2023 15:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522606; x=1694127406; 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=YH1ZsJfL6odLNAdY06q9TX6w45RtA1ESU5uhuRXFuvE=; b=GfTNNTLCOssgT8ThaAdd2nVWOSr/BgMaJcLSADuegdNXnggMm243a98KIbcTT1bI73 5uVMbBa0QEy4niLsUVI1bevwSskGpXVzCZcWqihZ0fxqZA/JuZEgr8De78gTsk3+SrrB b0T63CYf4LFf0ZEMikRZUuZjqpzCUiMjiZ5rqYc52gs86v5cX3wlQEHL+b4hbaoRzdg8 KL3VpHbuhjnpYX095tFK5hJBYLY6zmZ69oU/HA1RUP2KfXFHU8ZTD5lb/jqQ8RJkKAR9 Itk1fCczb8N7dLVvDmx3yZmIX6ABztJ1U3ygym6JX2Vd/RtrPYpc2h9PDHxD+6IxP5yP UfrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522606; x=1694127406; 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=YH1ZsJfL6odLNAdY06q9TX6w45RtA1ESU5uhuRXFuvE=; b=d47EQgRtJvm0ATxKpu8N2BIsyYNs4yxJMQI4WtO9exKSwGSZyavcXMYZFJjIGI3gPd aAVeGcanWAfBPJoFqYgaqHti6ZOeT1+KSOOE81eAEWexODCLUoE51D/O6pzYbzX9eUNM aMW/LSECbJboGHCExJJwahItb2k8cITs8m14ZDIkIuVuVem2QVo6Wk3+qqDz9JXCRt42 txoL9RROU1kB6hwZXiOmZRduTZFn17hlD+SZ/CPWoHAld68ERFkBT0EW/rbGuPehL2Mo Qh0lGB+CB0lhyWBrO6HTCQ9ZQl7PeHJQMJpiPqH29ZS9l1urGKFp51adZFIbjD3R4N+k bQIA== X-Gm-Message-State: AOJu0YyxKDw6inJBjKqJCDFjHWwQjrQ6iXcmRGkXqBhSGxPvjnldMFz6 60RHrYgXD6C5aH2ScQhOPTXppeIJZ5ZXS6LT5DU= X-Received: by 2002:a7b:cbcb:0:b0:3fe:22a9:910 with SMTP id n11-20020a7bcbcb000000b003fe22a90910mr468242wmi.14.1693522606141; Thu, 31 Aug 2023 15:56:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id rn1-20020a170906d92100b00992665694f7sm1239358ejb.107.2023.08.31.15.56.44 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:56:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Beniamino Galvani , Peter Maydell , Strahinja Jankovic Subject: [PATCH 06/11] hw/arm/allwinner: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:56:01 +0200 Message-ID: <20230831225607.30829-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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/arm/allwinner-r40.c:412:14: error: declaration shadows a local variable [-Werror,-Wshadow] for (int i = 0; i < AW_R40_NUM_MMCS; i++) { ^ hw/arm/allwinner-r40.c:299:14: note: previous declaration is here unsigned i; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/arm/allwinner-r40.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/arm/allwinner-r40.c b/hw/arm/allwinner-r40.c index 7d29eb224f..a0d367c60d 100644 --- a/hw/arm/allwinner-r40.c +++ b/hw/arm/allwinner-r40.c @@ -296,10 +296,9 @@ static void allwinner_r40_realize(DeviceState *dev, Error **errp) { const char *r40_nic_models[] = { "gmac", "emac", NULL }; AwR40State *s = AW_R40(dev); - unsigned i; /* CPUs */ - for (i = 0; i < AW_R40_NUM_CPUS; i++) { + for (unsigned i = 0; i < AW_R40_NUM_CPUS; i++) { /* * Disable secondary CPUs. Guest EL3 firmware will start @@ -335,7 +334,7 @@ static void allwinner_r40_realize(DeviceState *dev, Error **errp) * maintenance interrupt signal to the appropriate GIC PPI inputs, * and the GIC's IRQ/FIQ/VIRQ/VFIQ interrupt outputs to the CPU's inputs. */ - for (i = 0; i < AW_R40_NUM_CPUS; i++) { + for (unsigned i = 0; i < AW_R40_NUM_CPUS; i++) { DeviceState *cpudev = DEVICE(&s->cpus[i]); int ppibase = AW_R40_GIC_NUM_SPI + i * GIC_INTERNAL + GIC_NR_SGIS; int irq; @@ -494,7 +493,7 @@ static void allwinner_r40_realize(DeviceState *dev, Error **errp) qdev_get_gpio_in(DEVICE(&s->gic), AW_R40_GIC_SPI_EMAC)); /* Unimplemented devices */ - for (i = 0; i < ARRAY_SIZE(r40_unimplemented); i++) { + for (unsigned i = 0; i < ARRAY_SIZE(r40_unimplemented); i++) { create_unimplemented_device(r40_unimplemented[i].device_name, r40_unimplemented[i].base, r40_unimplemented[i].size); From patchwork Thu Aug 31 22:56:02 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: 719041 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741868wrn; Thu, 31 Aug 2023 15:58:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKPX9DtRnw6yFKL/coXGUFtPPJ9YTV4G8ZeKGJJRFOOr7G1TxFcarOZdyLPeCn/sVcypbj X-Received: by 2002:ac8:5cc3:0:b0:403:ef20:5142 with SMTP id s3-20020ac85cc3000000b00403ef205142mr1052463qta.40.1693522735138; Thu, 31 Aug 2023 15:58:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522735; cv=none; d=google.com; s=arc-20160816; b=n8FfWZFtgbj28aD0g3J0B5oI7CKgvxvZtuTN99NIY9LCac63d68uvlm+SwCYviRHZU DP53pBVRaaShhrazRp1itm0VxDmKaHppez8kWZrN/EHGYH1uw0YtrfNF3CvX37Krqriy HiqgwxU9Rwr6JpOBEGRCrFgU1/EFkcaev6G/2+RvN51LwFFj5b5lj6R1QUjpQrR3xqQm hUBxJXEIT32kNx5+JxpiWrNO7qaUWfTnQWTX2tXqObQaYHC3hY0IJjSQ5cLklR2INtm5 +YErPL3R4W5kQJ8BWH2TREvA3g2FEFblvhWUewYdfBEl/d8y5B+yOEwBNLT+6zo4Etez jByQ== 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=C//OKonAhBTdAA31WeZt4HEKfoMaq1ExT5IohWC+GEE=; fh=2dzFdWmoFMcRjG6X94z+TNmTpRmzCgbzYz+l0MFcCao=; b=0mCxy5tnS5VhVdXyqaiGHDQ0EscF8sQe2MHt/zUfcb9YE//y+fHG+rPAETT2rb5OND oVlb10b+aedULN7owOT65FWkJ5YoClVUKUOf4pqSUrwL7AttJdoiZMOUlwYuVFRD3Owd Nfo6JL/9yBAP8OtEDCzbu2GKruG2w9eRzx6wiF1ke2L5EA3wJirGvpL4JBrumnJ9Vkel MgP+PozsG9kJ7H7qiLRiqd8wHDlxUjo+ZBXbgJ9nddjvjjGIdQfHcTtxpu0Fxt3xjd7i i5grm2owl2+Dcu4RRqYA4pDFVMLsNJXo5W/udKL0eoIcSlKYDq60uXpNg/arNfxhNeYB LabQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZycqYeTq; 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 o4-20020a05622a008400b004009b446cd7si1479800qtw.258.2023.08.31.15.58.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:58:55 -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=ZycqYeTq; 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 1qbqaz-0004Gw-F2; Thu, 31 Aug 2023 18:57:01 -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 1qbqav-0004AM-PB for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:58 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqar-00030b-SX for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:57 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-31c5a2e8501so1127898f8f.0 for ; Thu, 31 Aug 2023 15:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522612; x=1694127412; 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=C//OKonAhBTdAA31WeZt4HEKfoMaq1ExT5IohWC+GEE=; b=ZycqYeTqToEPoiQHOVNKnceVyOBEVaynFCechXy+p2eraxH3cKL91PfxRb4CABXGA3 /mTjWwghNxCk7Bi5GJAwvuoOcSUJu+3nQAvogD1KUdjEFL5FimMTHVpEBftMjyE8c/Um q/MZ1w+x5f7NNmjb/V/klkYgRJ3LJerJX+7ysJ27Nyph9PTRv5kt3DcA2nnYVc9lSOAK lgqpCDM4PYDFZQjQvAOj9LgIIyOqZCp2F6xNAuKo5BnkEA4F77Jk0gPxgBQI+7VD72gy j7SqZYK1++1t75rTZTrptC3QcoQE4xPERgxy4a+tHsFaytbQTtHIQONHBy+zs/m1/0rA B1tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522612; x=1694127412; 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=C//OKonAhBTdAA31WeZt4HEKfoMaq1ExT5IohWC+GEE=; b=B/xlwJk7FoW0eBrN6dk2S29dSb8VEjry49qIjMZBg6ElPfz2m9CyXlSQFCeqpXn01m 1Bmii4L2iCCdQQRLqfDdDxl9MPIklzSIoFqwzf/2+Hyrqjz7QA3t/Ruee5MV6F8JEve6 oEcYiqfsyHp5r9HiS6KVd/gWq0GyTzCBuQjuX7lloNSpUpWCB7Owmty8l/kn+k/+wZcZ ZXoiGsAirU7d2btK9Bf2nMvy+aFw8DH3vAmWGMaIKff1jbXJCTEYDp8wG5r/TGcniHI5 zC0raS3ovFN7YgvOWc8BA9rocfKI9bC9KhEG+DTwRsESSo51BkA55nyxRu9/QfU+Cq0r IVTA== X-Gm-Message-State: AOJu0YzTZ8MQ4F7PnRsTWj7grsn2XkNFvaiIn+N77KceUNRFQc0kMKdY A0S/AH5LSwfJiS3YSYF82ASlOu9NCngEXxXoHx4= X-Received: by 2002:a5d:4388:0:b0:31a:d6cf:7709 with SMTP id i8-20020a5d4388000000b0031ad6cf7709mr718311wrq.22.1693522612215; Thu, 31 Aug 2023 15:56:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id d3-20020aa7d5c3000000b005232ea6a330sm1345355eds.2.2023.08.31.15.56.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:56:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , Andrew Jeffery , Joel Stanley Subject: [PATCH 07/11] hw/arm/aspeed: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:56:02 +0200 Message-ID: <20230831225607.30829-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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/arm/aspeed_ast2600.c:391:18: error: declaration shadows a local variable [-Werror,-Wshadow] qemu_irq irq = aspeed_soc_get_irq(s, ASPEED_DEV_TIMER1 + i); ^ hw/arm/aspeed_ast2600.c:283:14: note: previous declaration is here qemu_irq irq; ^ hw/arm/aspeed_ast2600.c:416:18: error: declaration shadows a local variable [-Werror,-Wshadow] qemu_irq irq = qdev_get_gpio_in(DEVICE(&s->a7mpcore), ^ hw/arm/aspeed_ast2600.c:283:14: note: previous declaration is here qemu_irq irq; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast2600.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c index a8b3a8065a..f54063445d 100644 --- a/hw/arm/aspeed_ast2600.c +++ b/hw/arm/aspeed_ast2600.c @@ -280,7 +280,6 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) AspeedSoCState *s = ASPEED_SOC(dev); AspeedSoCClass *sc = ASPEED_SOC_GET_CLASS(s); Error *err = NULL; - qemu_irq irq; g_autofree char *sram_name = NULL; /* Default boot region (SPI memory or ROMs) */ @@ -339,6 +338,7 @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) for (i = 0; i < sc->num_cpus; i++) { SysBusDevice *sbd = SYS_BUS_DEVICE(&s->a7mpcore); DeviceState *d = DEVICE(&s->cpu[i]); + qemu_irq irq; irq = qdev_get_gpio_in(d, ARM_CPU_IRQ); sysbus_connect_irq(sbd, i, irq); From patchwork Thu Aug 31 22:56:03 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: 719036 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741719wrn; Thu, 31 Aug 2023 15:58:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETijXVRSYQUtglfJOB66tB8ZJDXo753owClAz7BV30nw4ET394A/lLRISZHa+zvRzOeh90 X-Received: by 2002:a05:6102:3017:b0:44d:37f0:386c with SMTP id s23-20020a056102301700b0044d37f0386cmr770190vsa.35.1693522699835; Thu, 31 Aug 2023 15:58:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522699; cv=none; d=google.com; s=arc-20160816; b=uPlNtuoU981cP9BkcP5pzCBzGahhzzg+Vh1E0N1n5kEHy5D3SvVRjUoELqUCk4IMlQ Vu4prTcuJWITXyp3UAtGW/Ap8uX/b8Ik8pkGmw/66KTchoCmaLqW6U2qjLA1LR0okbnl ZTZQj8eFOgWT54Qva/OGGP6qx2Q2W753HoGHfuc+MkXr1pNzFKWghJy4UhNzQ7aJi0L1 RMrpNVIAKGksEl5vIajSPEmL8nh/HXWxwi3HOVGfHYOHvDVxDHedeXabpo2qyGPCXESR GRYEKeTkEBrrnRqgf9+NkJMBHx0zcNteyJU2N1lzuzCMUKCGI4EhKqOtEoo6rEfawNgU WQwA== 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=07RpMt5MApgRw9NJGh9PZXX3Pgabrwsg/tvmA1poNBo=; fh=idq1fxLttOtnmCkDPrxdp99bvZG1Jl1KEDnEWAr8dSM=; b=j8XWdAyixEFAVpRiqhyS6wUPpGzs5bgSKCRpmfBVkXcVUZW1pKR82Gu7HA4xZDyaGB Q2w2htUEtR8CY5AqyFmMlXchRCuxp4JlQYDBN6jj+XjgHNWI3tiRHA4M5ZUQrbJ76Lto zw5yWaWlmhPw0SV/psaN00l/GV03WKjAPjF+/Liid0fiDbUqA7jsZ+QwnagKyTgWejn8 FXivIQe4yGPZUME5NxrBL1cu/x+hHxfWk4Jcl1XDxkTnY8L+7Gm9uJGXitLzFgpXVf/e +JzsgqE4ob5dEjSg0iObkKltL8ugCC7T3se8OPqQoBBB1+wGIU7Tm+AxU74Uzsk5/Yfn mVHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lGQGAhhQ; 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 o13-20020a0cf4cd000000b00640c5dd64bfsi1497890qvm.110.2023.08.31.15.58.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:58: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=lGQGAhhQ; 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 1qbqb4-0004Sm-De; Thu, 31 Aug 2023 18:57:06 -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 1qbqb1-0004Q0-MK for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:57:03 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqay-00034O-Nj for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:57:03 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-99bdcade7fbso152896466b.1 for ; Thu, 31 Aug 2023 15:56:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522618; x=1694127418; 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=07RpMt5MApgRw9NJGh9PZXX3Pgabrwsg/tvmA1poNBo=; b=lGQGAhhQSn0lSGUBdZ80+FaS4uKk7iUk9/Q0TpljhNFpiwPV5C2M3ZdHmUBCY3WPge hgJGh8e9ONA8cwHkvsaaGXr0DERTa0nAs3Je0RrUVGOYnHuMgFbXGYUyKl/PzflQyhl+ 7o3KIxt41flbhJ4GKK+i1GxTEaxbJ9nyGa4sHcMsKKNA5MSv59T4WDbcwaB6DBgGMksS Pfi+kN1Ch06BJruXOyiVOqjYlZW6b/55x1vsIDIgBwUzKnZqm9vry9DoglxrIS5Rn5fp jEGBaiOAGcjteoQ5ZPX6tqWt+4rWrFpli/5KOVQt2epqY8BvilzhrhLhWxLEgbuvjfKa PmWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522618; x=1694127418; 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=07RpMt5MApgRw9NJGh9PZXX3Pgabrwsg/tvmA1poNBo=; b=IkHWfZhi1IRqx7m2z2pkiJky2umHAcpGsjJRaz5DuzAAA8eP1ajY8dibmY12yyepQw kZwh6Rebb0BGuWlnOSvR1sn+mF7+xw/kaJSBLIx/6f8b+kcYjZ3jTjJubCp7TQPdTN04 B2HB23iS5NsGPtH6iZuoSn0wb3XpETfYURLOtgAGCeNp2WfF3nxXSqQPeDVQEu89ZFmI l1JsTfqAJFr/jl1wXry+g0XGrpLn7J9vXoeDxAhZTKkmVqzbFSiXrv7/GC7M75atUcbM WMvKQP52QD61ZMB2qIuwtQceU0dKKHqdaXlVpPqQ/dXiRCRcj+g7zSZIOBQPixWZeTP4 RGUg== X-Gm-Message-State: AOJu0YwMartYlB+C+Px5hihoqmhBmNGu0zAaAtQIai0+3BI9wlZtY4Nf DvpaLFBflvsOPsQJTgpA2HzX2p3hRQaSIr3fEtQ= X-Received: by 2002:a17:906:224a:b0:9a1:f415:7c24 with SMTP id 10-20020a170906224a00b009a1f4157c24mr530634ejr.46.1693522618052; Thu, 31 Aug 2023 15:56:58 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id s6-20020a1709066c8600b00989828a42e8sm1246798ejr.154.2023.08.31.15.56.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:56:57 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Laurent Vivier Subject: [PATCH 08/11] hw/m68k: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:56:03 +0200 Message-ID: <20230831225607.30829-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.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/m68k/virt.c:263:13: error: declaration shadows a local variable [-Werror,-Wshadow] BOOTINFOSTR(param_ptr, BI_COMMAND_LINE, ^ hw/m68k/bootinfo.h:47:13: note: expanded from macro 'BOOTINFOSTR' int i; \ ^ hw/m68k/virt.c:130:9: note: previous declaration is here int i; ^ Signed-off-by: Philippe Mathieu-Daudé --- hw/m68k/bootinfo.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/m68k/bootinfo.h b/hw/m68k/bootinfo.h index a3d37e3c80..0e6e3eea87 100644 --- a/hw/m68k/bootinfo.h +++ b/hw/m68k/bootinfo.h @@ -44,15 +44,14 @@ #define BOOTINFOSTR(base, id, string) \ do { \ - int i; \ stw_p(base, id); \ base += 2; \ stw_p(base, \ (sizeof(struct bi_record) + strlen(string) + \ 1 /* null termination */ + 3 /* padding */) & ~3); \ base += 2; \ - for (i = 0; string[i]; i++) { \ - stb_p(base++, string[i]); \ + for (unsigned i_ = 0; string[i_]; i_++) { \ + stb_p(base++, string[i_]); \ } \ stb_p(base++, 0); \ base = QEMU_ALIGN_PTR_UP(base, 4); \ @@ -60,7 +59,6 @@ #define BOOTINFODATA(base, id, data, len) \ do { \ - int i; \ stw_p(base, id); \ base += 2; \ stw_p(base, \ @@ -69,8 +67,8 @@ base += 2; \ stw_p(base, len); \ base += 2; \ - for (i = 0; i < len; ++i) { \ - stb_p(base++, data[i]); \ + for (unsigned i_ = 0; i_ < len; ++i_) { \ + stb_p(base++, data[i_]); \ } \ base = QEMU_ALIGN_PTR_UP(base, 4); \ } while (0) From patchwork Thu Aug 31 22:56:04 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: 719039 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741838wrn; Thu, 31 Aug 2023 15:58:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEumf1CDcny/G43dkHxSItVEf9DtHsIGwq4tsglFWjt5TeaMGlyOXOMGqqUC72gTg80HccG X-Received: by 2002:a05:620a:24c7:b0:76d:a27c:245 with SMTP id m7-20020a05620a24c700b0076da27c0245mr1458178qkn.7.1693522727874; Thu, 31 Aug 2023 15:58:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522727; cv=none; d=google.com; s=arc-20160816; b=DBvgWKl+BMuGA7SI3H9nCDpsqqDHbPk+WFt8RLQajU3opOq5mYRCbCiVLyMNS5y99Y PnV9yHYDW8/AzZVwVgfsxbqXnmqfJCHEvzMdRJpwKsAAkDiQ03Q7NLhlfrpOGRhfj7pl QSyJFGx44ggZRSri4fJ8pirKtTvukIZRoymjoigYyElGf0B0szPJr+sYNStna17c4Wjs WwdMpqPI1mMhUQezDKp1f/pqIJP0eQw+MVWs6gHiTJDnV4fpQEkFdvj947Q4gDY1ssCd 0W38Bq9HA7RkwWWJNPzfiF1q7q//8YGtrhfMXGekcAHBS1MSAVifMsxhMHeZurvLyh0u FoEA== 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=4KLx6XBhwZsbEqcvd2/L0DAF2KnkpBlHb/IZBmOztIQ=; fh=6kBnmdThd/Mtcn6GnZSOF8dqD10/+Dyg8jWJhZHC9H4=; b=bwgKD2RcbdhQ4ERFz6BClH90ueMTONGj4MZRJNU1gXqob5AFwbSqVRWQA3IhC36Dif 0Jm88L/j7yq5o9T/YZZQFLaLlZh6wSaaAASrJ8jk45k0xcZccgnKN55Nh6w6nXZag3Kx RaIus5RJvESnhBkfxwP93W49AlYR8N22NngdwN7taM0Jj7mXVC4kTBPWRGQ7NqyBKUXw m4fV684y9JH/1OG9rno7nqtX735jNhaRzQsBqLLHVw/qb2GH9YMDcS4IGmoL70G6Ozdo w10nmmKIcrdbRGDpC5AQGEevDa5i78sgvmWuzCWx0irmqA1Lk7hrEJtPOTDXxto3rLs1 RWNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YeGwrBIu; 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 t21-20020a05620a451500b00767eff18f66si1594935qkp.553.2023.08.31.15.58.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:58:47 -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=YeGwrBIu; 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 1qbqb7-0004Ug-Cw; Thu, 31 Aug 2023 18:57:09 -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 1qbqb5-0004TJ-89 for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:57:07 -0400 Received: from mail-ej1-x62d.google.com ([2a00:1450:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqb3-00038C-3w for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:57:07 -0400 Received: by mail-ej1-x62d.google.com with SMTP id a640c23a62f3a-9a1de3417acso551233766b.0 for ; Thu, 31 Aug 2023 15:57:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522623; x=1694127423; 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=4KLx6XBhwZsbEqcvd2/L0DAF2KnkpBlHb/IZBmOztIQ=; b=YeGwrBIuzjOTSmCeVjJ0kHsDobcKC4tY5b8eMQbxApar//mN0cp3kZIni6gJHA82s0 v3V64jpK/XFDcYolINV+s8QhM59Bq3a5/2ls1J11O8kjsapmtLiEX5cxPWXkmp8BRjRm Uv8yOPwmEtxUoLZXBKnTohZjfaXfrSDqocKkaCOG16cYptDz8Hnl2G9bTr3Ga3ydKg/3 ZU2ayDxvrPn1UwdqF/qQ6Shqf7slVdOBqUVzDNQ2E7VeDB4yd60SxfXtOIcRwsTKd8Fn RhpeBDKN6AVseHlnMBcj1vN/QR1Z309JdZiByDAimgeKjp1XiRff0B8lhBDL3nyy8Axf mbXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522623; x=1694127423; 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=4KLx6XBhwZsbEqcvd2/L0DAF2KnkpBlHb/IZBmOztIQ=; b=jMVzwoS2H+mAtYkZE8L37/8zzzD18LGU2lITD2a2dM/Y73NTUskjA3luWxHrEK2H0t p1fuCtBDzGSrspDib40WrMuA/08kHT+jNwmutFYIYxJoJwci06u3osh2CPwJ62h4AsHl AtzVU89iHnarn6jfS6fEV6aLUHSyAdyBLaUrGQqSHLFDZ9eUkIIJ1Z6bQhdWOz+/dwlc WapOhG2BOR4u8TZH/RTNG6rXTFE3sCB8sZVoGO9X2Zr2H6Wb2jAL1HPJ74HzTDbK7vLC +Z8/eFyBwY42yUYvD1qXQyChz1nltf5dKKGVgu9sQEUmMtS9c9cBbWhVNb6rsepGyAc8 c+dw== X-Gm-Message-State: AOJu0YyqPtJwO5IFAXEs26diCWzchs+R1Krr+W5cDxIUmhQ35Y7d0LCz HzNzYYQP0Js+ByCyRRsQiZk+GGrINLEML9IELJI= X-Received: by 2002:a17:906:73d5:b0:99e:afd:f2ba with SMTP id n21-20020a17090673d500b0099e0afdf2bamr1190360ejl.35.1693522623707; Thu, 31 Aug 2023 15:57:03 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id t24-20020a1709064f1800b00992b1c93279sm1244368eju.110.2023.08.31.15.57.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:57:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , John Snow Subject: [PATCH 09/11] hw/ide/ahci: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:56:04 +0200 Message-ID: <20230831225607.30829-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62d; envelope-from=philmd@linaro.org; helo=mail-ej1-x62d.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 hw/ide/ahci.c:1577:23: error: declaration shadows a local variable [-Werror,-Wshadow] IDEState *s = &ad->port.ifs[j]; ^ hw/ide/ahci.c:1569:29: note: previous declaration is here void ahci_uninit(AHCIState *s) ^ Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 48d550f633..8c9a7c2117 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1573,10 +1573,8 @@ void ahci_uninit(AHCIState *s) for (i = 0; i < s->ports; i++) { AHCIDevice *ad = &s->dev[i]; - for (j = 0; j < 2; j++) { - IDEState *s = &ad->port.ifs[j]; - - ide_exit(s); + for (j = 0; j < ARRAY_SIZE(ad->port.ifs); j++) { + ide_exit(&ad->port.ifs[j]); } object_unparent(OBJECT(&ad->port)); } From patchwork Thu Aug 31 22:56:05 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: 719032 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741544wrn; Thu, 31 Aug 2023 15:57:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG/V43JLNIqQnQCKD3WGBRVUXeOiK+0+wqt9pVFkfg8gtL0jP4XLRUGti6gXqBU5+g7kv5t X-Received: by 2002:a0c:f805:0:b0:63c:fac8:ec0a with SMTP id r5-20020a0cf805000000b0063cfac8ec0amr614434qvn.21.1693522664439; Thu, 31 Aug 2023 15:57:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522664; cv=none; d=google.com; s=arc-20160816; b=F/6Dd46hnEy2R8TIg4qbg0iEQbjxgSyhJF+XvF8dWDXSb/by26FDkzlSmOs8o0HnXK OM62C1hJ0jEG+7k5v0ofGvt99u2ejR+50te5ndRErteevXWlkRoQ5PuKXAnCp7g8L9AN HZNrNgFmPKGe1wUUDDeoFEOc7HDI8f1gujx57SBk/5IMEq3R4PQVBfivt2hGtySVCRR7 XW0IXGCyvr8jAzdkLNdAqie7YedTba4w5lF1tDdWAE6fP1/ct6SnxxTOEsltlPhpAMAg wyuTD4kJM7O1odGS7u5N660Zyf9LDr7/WowHl/Fw3Utcl7Mjai8TCzsINIs/udx14bZg BWtA== 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=x6ajozl3I8cZhElfB+2XmFUmgwvrNnndLTvZEZRsKzQ=; fh=eWX20Eppb/Q2rNA1nFHe9JP7BELrntjubfujrTEXet4=; b=KO1mT5d+eVmJ+TPRaS0n/Bbw2Ls6Fo+koFFr/oyGbYuib4Pkfm07htnOc4RF7taRIA O3LfQ063UaPExPuUlXi+F5pX2fZf26px8WUEIbxbvBFw/LJNJPTfyDcfaF+CdtvNcuWC snPNR/P5X1QmmeSHDpzTTL5Tos2FHGba/5loYyUQINbRWJtrfvYGwpjIRq3Sx8bId8E5 BdYKPeJYqB5irVG3mjsuDKuycscazeU3OHQmjsWR28j10Q7rkgVpLcPtLktCK5BfOtP6 9/2XRU29TDDDP0rvp48xjLzFAM+F5oYh0beow5e8T/qgQitqVgdxd7Rp29OXViMq0Qcr sTHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qbs72Wtg; 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 z7-20020a0cda87000000b0064f70ebac6asi1527619qvj.106.2023.08.31.15.57.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:57:44 -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=qbs72Wtg; 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 1qbqbS-0004fa-3t; Thu, 31 Aug 2023 18:57:30 -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 1qbqbB-0004a8-AQ for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:57:13 -0400 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqb9-0003Au-5O for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:57:13 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-99bcfe28909so151988866b.3 for ; Thu, 31 Aug 2023 15:57:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522629; x=1694127429; 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=x6ajozl3I8cZhElfB+2XmFUmgwvrNnndLTvZEZRsKzQ=; b=qbs72Wtgr5wleqqxACB2kg5jrFwIOtIYweM0AmXR0vGNhP0RPJuaQ1zHjixnJlcc0y 844xTw+Bm09WwmFFT1MarqvxiZaYwKRJkYPCjlgkjT9nZRkUiLax91TCwR0MTGAxVLPK GutDeGUHzxkG/JXcOov15ZeDBvFeRgHbPywwxmmFLawRKKv3Shl2teTxmW+nfl96e2F+ fb6sfHSegvd+Ur1k1uX2YkQk/h60FhC68VLcLXjqPOBzvOxHnXvWrdOeZvkSdVRkI6RB 4LhkdingWREmc0V0GkI5BLyhZiz+Xx0cXE9wmlyY2Ouu/XLnCmheREakmlInOABXbf4b UX+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522629; x=1694127429; 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=x6ajozl3I8cZhElfB+2XmFUmgwvrNnndLTvZEZRsKzQ=; b=PPMRSjdh4p3NS/52RWrMSrHksJLw4Ul6XEhnA2bHq7mg0+vV1gzQsgxNe+bneJ6L+1 1OCJzu25CKmAkxt8+cdlB/tu4ug6k3Vq0ByY+kUnNoeK3f7tCP4JROU9cVwN2MNKGr5h zFyVe5eMzkInjjAYrIClCu6JAC57Oscukv8yfvt5Hb/sTNVR9FhKWAvd0Jz0Y7085AND ye3yq/13NYd1bMQtl9ATJ1ae2kdR1gwjSXMp9hGFVPdxfJjhwfoYAQcdponmwUxmbJFB UWW77q+yKQkMXuu1NSpUrh058aM7NIrSXxn+XvAWsOxb9l+t2TSzEGW5LJiTfnuqJaJo z6RQ== X-Gm-Message-State: AOJu0YwkFlql4pbtsCIdXHX5HKivFDpajDI/H1Ro7cFHsDtuakF7QyFb hcZd3He0KJ9qeNbzeYZCn0lfzmoXrR3PiMdb0yQ= X-Received: by 2002:a17:907:7804:b0:99b:5574:7d0f with SMTP id la4-20020a170907780400b0099b55747d0fmr439332ejc.23.1693522629667; Thu, 31 Aug 2023 15:57:09 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id dt22-20020a170906b79600b0099d959f9536sm1273599ejb.12.2023.08.31.15.57.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:57:09 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Dmitry Fleytman , Akihiko Odaki , Jason Wang Subject: [PATCH 10/11] net/eth: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:56:05 +0200 Message-ID: <20230831225607.30829-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::630; envelope-from=philmd@linaro.org; helo=mail-ej1-x630.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: net/eth.c:435:20: error: declaration shadows a local variable [-Werror,-Wshadow] size_t input_size = iov_size(pkt, pkt_frags); ^ net/eth.c:413:16: note: previous declaration is here size_t input_size = iov_size(pkt, pkt_frags); ^ Signed-off-by: Philippe Mathieu-Daudé --- net/eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/eth.c b/net/eth.c index 649e66bb1f..cf030eed7b 100644 --- a/net/eth.c +++ b/net/eth.c @@ -432,7 +432,7 @@ _eth_get_rss_ex_src_addr(const struct iovec *pkt, int pkt_frags, } if (opthdr.type == IP6_OPT_HOME) { - size_t input_size = iov_size(pkt, pkt_frags); + input_size = iov_size(pkt, pkt_frags); if (input_size < opt_offset + sizeof(opthdr)) { return false; From patchwork Thu Aug 31 22:56:06 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: 719038 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741824wrn; Thu, 31 Aug 2023 15:58:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHsV36VfuSB6s9uuDH847LYmkB2gR4WbqSvXMTq0FSh1N8ZScrPxXMldv2Orln8AWPKwa8f X-Received: by 2002:a1f:4e47:0:b0:490:5c1d:3ef9 with SMTP id c68-20020a1f4e47000000b004905c1d3ef9mr1071737vkb.5.1693522723854; Thu, 31 Aug 2023 15:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522723; cv=none; d=google.com; s=arc-20160816; b=Y5AFBX5BPhdl28Px2zgNnninYDs+Efp3i43cAPXPs04WYhcSAWcSNB9gZ5qCIkWv7v AwB+xUGrB1oLC+JXYpyNa7ogB95pLVPdDikkWBD3vc1FFMH8uFvXEnwUFRe+cjktI7Zd 3Iff79d7bemLGAJQCGfgKMaexnmMDXhUmPYbMytg5g919i6KC8oFzugKoVKcFcCwapyh qpZGWfKCI/EgyIwo85U5mkHhUPZO7l0oNlu0cSQULzMQ/xZj2n9vLBtAk1yY8ibW72lK sb7klnV+MHp3ZxH25h0QDEBXK5IwJJMhHFFdJHcBFryBFFmoVB/qsMPR19s6e/o0J1Hn uiaQ== 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=4GNi2AOj7YBZidVqMdiMTsl/wL7uqVeokPItco5CZ1w=; fh=rmbPMLkKdMLoE/1W8nKMRiIPVfrTnm2fPPNYpN4rLFw=; b=td8jU7GEYpVduQoZqXoDrV5tSAzAZardTqcwrq4VAV6GjqmRu2Pbc6yOXV0qIevRXM IM3y4sXCPs+pS7sbDvOQpeMz69U4bHsNCOSPaKptp49YsIi8NIjJqJLk38gXaS6iNuhz AXo1JThCFR96/DfdsWuHYJ6AZCy1aezb5nkYLoN199OTQ9dxuqjMm56UdG+drzq8dkst 2fMXzI5nnaDhayGJwbNdJBo4ReRIp7E+x29GHdyMd3aUq8NQKTe+L6zLk6kTjT0Aurmn JbMwQC14k7NEP/eCuLBAF2MMfAlZh/kBCtuIeyO1T81GexY3dFVlyAUTu/FzKVhSXkSN Sn0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BO63+KHX; 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 z11-20020a05622a060b00b0041362f42bcasi1462765qta.794.2023.08.31.15.58.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:58:43 -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=BO63+KHX; 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 1qbqbW-0004sf-Ad; Thu, 31 Aug 2023 18:57:34 -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 1qbqbJ-0004fZ-Eh for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:57:22 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqbF-0003DF-Po for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:57:21 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-500cfb168c6so2428965e87.2 for ; Thu, 31 Aug 2023 15:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522636; x=1694127436; 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=4GNi2AOj7YBZidVqMdiMTsl/wL7uqVeokPItco5CZ1w=; b=BO63+KHXIScqc/o1nMCK7Mz7lmzuQ7DEUqw5iMowpiHgfWKHpf+qh+cI6bt1O1X7lv jkWzn3QOvsV7qoTdoVIHU26sE7ytH1hGfb743k8ktggJdcq6bJM9UFASbkpsSZx8ulYu P3uChnX+V6qe5PFdlRv+dEmyh/zmwIuWb1G6kihR0vtPSasbauctsgyrKTnFQljyIji0 tGbFI08BMYB60KPMHgmqnDJKF9olgPtTc4/hmpQbnMRbG6UfLyfIke2WjtwU1mxe5Rqj Ck15lRS8uClSMjIbrQ5A4t1U815fY1Oh5wtTPxFj1vtckQqUUwFnaG3+L+vd1wP1CbKB tSLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522636; x=1694127436; 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=4GNi2AOj7YBZidVqMdiMTsl/wL7uqVeokPItco5CZ1w=; b=iHObpH4S3OwQ4I/XOInmNyrMpXVWqjS1SWixKiEiAnj0cQYTJaSedOMezvGW6ID816 EobhsNTQHS7jT9G2GOWOHNgii3CH8pweHJ6lWLFn8ltWaNrK6dJeLj1eyHZFgeEQUSDc qoHZYuVQxTR7xGG1a2EhDMWj1WxKp2UKUNfS5SOQsnbZv6u24mySFGh6cdUUMzZZKqsf 3domZ/SVjTT7q/3o56/sXyoZv8h+K28en/oru2ZjEaxklExlf1HR2PgevChsuQbOrubv nxHX7fl0i3cMv690pIu6v0IgZ5DqRfg60xti1Kt1rPdWMi5HpYCu6wLf9X/mADlbAP+U gisA== X-Gm-Message-State: AOJu0YzpFxWvkqt+88zUNPjiQ8PJn9tTge3KjhgYHY2AMcaeW7/El12C Ei/vyy9tgErr+Lq8dkEmldK7IX9Wqwup4N9Sojs= X-Received: by 2002:a05:6512:2513:b0:4f8:8be4:8a82 with SMTP id be19-20020a056512251300b004f88be48a82mr466680lfb.22.1693522635678; Thu, 31 Aug 2023 15:57:15 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id j8-20020a50ed08000000b0052333d7e320sm1304363eds.27.2023.08.31.15.57.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:57:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Alistair Francis Subject: [PATCH 11/11] sysemu/device_tree: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:56:06 +0200 Message-ID: <20230831225607.30829-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=philmd@linaro.org; helo=mail-lf1-x12f.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/mips/boston.c:472:5: error: declaration shadows a local variable [-Werror,-Wshadow] qemu_fdt_setprop_cells(fdt, name, "reg", reg_base, reg_size); ^ include/sysemu/device_tree.h:129:13: note: expanded from macro 'qemu_fdt_setprop_cells' int i; ^ hw/mips/boston.c:461:9: note: previous declaration is here int i; ^ Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/device_tree.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/sysemu/device_tree.h b/include/sysemu/device_tree.h index ca5339beae..8eab395934 100644 --- a/include/sysemu/device_tree.h +++ b/include/sysemu/device_tree.h @@ -126,10 +126,8 @@ int qemu_fdt_add_path(void *fdt, const char *path); #define qemu_fdt_setprop_cells(fdt, node_path, property, ...) \ do { \ uint32_t qdt_tmp[] = { __VA_ARGS__ }; \ - int i; \ - \ - for (i = 0; i < ARRAY_SIZE(qdt_tmp); i++) { \ - qdt_tmp[i] = cpu_to_be32(qdt_tmp[i]); \ + for (unsigned i_ = 0; i_ < ARRAY_SIZE(qdt_tmp); i_++) { \ + qdt_tmp[i_] = cpu_to_be32(qdt_tmp[i_]); \ } \ qemu_fdt_setprop(fdt, node_path, property, qdt_tmp, \ sizeof(qdt_tmp)); \