From patchwork Mon Sep 4 16:12:13 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: 719988 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1686269wrh; Mon, 4 Sep 2023 09:15:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHMqbaepDIoLct56/6wdRk3Jls+8JVQE/2vD1uC8c3BvHRBiI1rUNE6oPx2SKQMoplV4xpM X-Received: by 2002:a0c:8c8e:0:b0:64a:9308:3016 with SMTP id p14-20020a0c8c8e000000b0064a93083016mr9924891qvb.56.1693844110844; Mon, 04 Sep 2023 09:15:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844110; cv=none; d=google.com; s=arc-20160816; b=NOcW1lVIk+difhsynTjsJNYtSiMOfWIONisslFkHHFdPgoaHqaKTKUT3Q2SVcJEovH SaqKmCHNQs8ZL//OBwZVfhUOBRm0KlobL8y5FbaW4aGrcQLeqe/qZdPos6PDonHB5Ulx 4vs4lzjNMjnKDz7P+PfppKoZPlZoyiRm1m9Ad6FTE/jm87nY3DbcOV/XJBKIhmLC3pAh 1qCMp4kEhR1jCJ2GcfBfMr+ge2jCr3FdK+P7Z9JFM0VBfRqf7k4AkA1wpO7sDLzvtnCX ypiX3CL9ftl9YyJJr5uC/G4jQ/TDfl29yXsG65MrhFS1GGdLbDZhcaCLl5dN+lO4z0HX QGlQ== 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=N90SnBdmWSypsr8O7NL02X7WPwcEDQupIGJmLBYDN2o=; fh=Ht9fe80UlXDtmadWXCaW/DF3K9q409zZ9r8h2aDhtZU=; b=wmwx6yXxxhn5y2Rc3PoM68v+BVf7J+M2Ep5AJ9VEloqXQbTexITGveB6tVe4bz50Em 9+SClL1PgqM/OofzoPWc0v0Cuv6ULgLOP2EtR+baXmyqzeGIDfFdg2aleart1BgEGJJD s8w+SlUKj5si7C+6xwxwBiV6lOFWPKzPTbeQHHML5i4Q2SzdxhjcHebNxzgdqETRLKJY 0SV+6wdxJMxom9OT2VOdNLyT87iAZg+3uYyKG72UkOgeAfyIhWYPpVlhrN+4lKXrRz6Y 0gZdO+eI77tlBOwVGOEb2n5C9svT9hgKmGL+eX+H9i0MGTguyjZtQ2QBflyj4UmH5r+m N8Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H7ice2gd; 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 n13-20020a0ce48d000000b0064f53ba19c6si6500748qvl.389.2023.09.04.09.15.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:15:10 -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=H7ice2gd; 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 1qdCC3-0002HJ-NE; Mon, 04 Sep 2023 12:12: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 1qdCC2-0002H3-5X for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:12:50 -0400 Received: from mail-ej1-x62b.google.com ([2a00:1450:4864:20::62b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCBy-0007RI-NV for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:12:49 -0400 Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-99c4923195dso250148366b.2 for ; Mon, 04 Sep 2023 09:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693843964; x=1694448764; 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=N90SnBdmWSypsr8O7NL02X7WPwcEDQupIGJmLBYDN2o=; b=H7ice2gdLrYkndQFf6HXp/i52qTzrPChBhIFAvkOPA4PvR2kvlo4cpZ5hRKqpqnyFM nJmYmHPK5Ns9f86wqf8gIE0/svIEwXhLDNFNxTh+dLcig7Ch9GHRZtFyOurfGPG5o4ds SWf6RGBvzF+ep+u7JIwVI0RZblPpVoBWOZ99GaeksknIgiFf0jP5T9Ejh6DcVuTIuTLP a4hUKo4y3YQnTg2tdn5lN3qVjJs4B2obC9b497KVQk/aGXJ4Zg8RbMz/dGIGHpkmi3GS /gQRudJCGL+S2uU40sFYg/2OM6xNKlB1kAxAADYJXliRpzYBeRtgbalYGNBzeNydab0Q FKMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693843964; x=1694448764; 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=N90SnBdmWSypsr8O7NL02X7WPwcEDQupIGJmLBYDN2o=; b=ljxfMiNpL0hrTpvD/HjJt9Y1IsbJbI3cT5fHyTOZWczVWlEMt4OcSjw5rYk1g35sHt BZoKqCN01KjEoaFNT+lgzNibfRV+gckA+oyerbnxV50gl6JhIWi2PTsJYLxajcay2Usd u4dqXh5w7KR5aoLSoCRtw81IGhz3ELkAbkrE/8/m7GWUSMCGkBO/aHfmXjpV9d7ZQiqb YPqQAVJ1ZoKkdHfiDErP6JfWUZeFWn1gv9RKB8StWqcrW0iELc8/zHh24/n/kNc5isdI TQY4G2n1LAjWAA2rVKoY29eOCIkF4AA1oOtNa/jb8C1uPfaI9MkTkj9z1iTSE0TLG1IU CJLw== X-Gm-Message-State: AOJu0YyNQZ41ZIVVzqEwg6EiArTRlPD46UdF0TyOtdn7Con146XlneZD XEKHfWLJaHFGJW9SoXvD7Hzkdw== X-Received: by 2002:a17:907:7759:b0:9a5:7e64:5c55 with SMTP id kx25-20020a170907775900b009a57e645c55mr8578981ejc.22.1693843964090; Mon, 04 Sep 2023 09:12:44 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id gj17-20020a170906e11100b0098921e1b064sm6368723ejb.181.2023.09.04.09.12.42 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:12:43 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Richard Henderson , Paolo Bonzini Subject: [PATCH v2 01/22] tcg: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:13 +0200 Message-ID: <20230904161235.84651-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62b; envelope-from=philmd@linaro.org; helo=mail-ej1-x62b.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; ^ Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- 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..6e2cf52802 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 mop = 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[(mop & MO_AMASK) >> MO_ASHIFT]; + s_op = ldst_name[mop & (MO_BSWAP | MO_SSIZE)]; + s_at = atom_name[(mop & MO_ATOM_MASK) >> MO_ATOM_SHIFT]; + mop &= ~(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 (!mop && 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); + mop = get_memop(oi); + col += ne_fprintf(f, ",$0x%x,%u", mop, ix); } i = 1; } From patchwork Mon Sep 4 16:12:14 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: 719983 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1685709wrh; Mon, 4 Sep 2023 09:14:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENc7QunyH7VXqJexnfivJbgDa05omGR7Vrp94Qgb41SHZiTtqA9Pd5jPnYAhneuDVRP8E4 X-Received: by 2002:a0c:e9c3:0:b0:64c:f2e1:eb3 with SMTP id q3-20020a0ce9c3000000b0064cf2e10eb3mr10382619qvo.45.1693844043402; Mon, 04 Sep 2023 09:14:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844043; cv=none; d=google.com; s=arc-20160816; b=ZtSub691o0zgdv/Bdi2lfr0SMGELT3zDEQNZUrhlIEmEwjNJPHI+4EjD/9gXl7Lksc znePLlGkMy4grqLCy6PlFdC9VtV965zEQWUljbohQUsAt7/O9Q9iWykrVX+c1ncV4NuY oxa27zi5QyxNAEqUKFNckJ746XwX3QlkOob2c9LvSf56chuXwjMwaeBMZuyvLhiAm0LT WAdIad9epv7wOsyzX9ocAymE/nKIYIXgLPp+DyUZZojpKZjcNKorKNlijkT+JSEMJK9F lyJJm0yYehvRHp6J/tUxF9l2IBkkJ8+h5oai6RUwExYkdbwcYloTEw6ma63POhnl69uk Dt7g== 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=dNCHoIP34uA/E3xOU1iH9Qlj7WL1hYi8hhHkGEO0aL4=; fh=JiW2z4nACjvivIcmH8UztD+5iohCy/JDZINC166FmPE=; b=kAUY4nVSiMGcFCLHKeBcUhImZwYWeZUK3lOty8ZPhX6HeDkEiS08hhvp2NbQGArxMr LnGuiivLQRE6IMHw/XXyOuQYd6PKHlRzc8Cs76dGCloU/ZOf0xWCMjLPeneVGZe0xMx7 ebXCvnqyaoJOAdNKzrgYMMEpHYnI66eMUMfBchRwudKmyJR1JLkGHRU/rOWGi3FevndF 1eORu8uC1XXlMB+c13AOQF970skg4oiiyrBYa5Hd/vTN3VENrHyXy/ZMwnCK2nLhVmHE iNaEJOoMQsw2o2O0HE9kc6ASeW1984YOyvc6BzL5brcxl08kKceEr0N6iogJmY98zG3q STMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xWrDzV6l; 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 z12-20020a0cf00c000000b0064b37be0bfesi6507576qvk.132.2023.09.04.09.14.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:14:03 -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=xWrDzV6l; 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 1qdCC6-0002It-K3; Mon, 04 Sep 2023 12:12: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 1qdCC5-0002Hb-B4 for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:12:53 -0400 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCC2-0007S5-Ty for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:12:53 -0400 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-51e28cac164so5254266a12.1 for ; Mon, 04 Sep 2023 09:12:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693843969; x=1694448769; 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=dNCHoIP34uA/E3xOU1iH9Qlj7WL1hYi8hhHkGEO0aL4=; b=xWrDzV6l/c6Uq2QfWPV3VaXF9hBfdn2TAaxDxsPu8/Fbju74p4WEGQ+YEesLj/9wmp n+WcexhrykMAcnuR1R0g0xFPXvjuLfOuZ5Tirc9jb21gFbCf17uAPkWvMSz67B3g3uDl xk83gzpIBvsR+PStSOlbs6N0oqGucQD3XyvxA7nXn/lqblSy6TngW5nQFfFfaEpLxi8t RXd7hFDFYEvedfEtku9E0hI/Kbp84/XaFaseHArkYInfmiwsohQihLJLyHRQMkEFjNEv JOcjz8m7Q58uTLAMzsm17kpliMNBuvW0rYkWxejhTzAkkaR20g6j7UKLEpvlScA4sbTD mVfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693843969; x=1694448769; 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=dNCHoIP34uA/E3xOU1iH9Qlj7WL1hYi8hhHkGEO0aL4=; b=Rg55DZaK09cuDXbEVWjWjsa9I20feqfN+ZQTZdyjwBAQ5kygTAMHcE3BLC/5cr446E a210Y7EwvrcA10QNd/Ofx+sbv22GeO4BTqNiJQ7KMGhfHx+DfJNK9kxRNamzpD6fXo40 kSvfKtasDy9ChV7BDLB/X3gIGyOGwaIvDMlOq/sXsyGN1b3lRP2pBq3m30kO2DPjarWG vdHTf1AAAnb2OLqxVV1TMYHSPi8wNp7TopyAgRPmBLcRcz6hXkEJL6BTpiIGnGtnLHz4 13rQUl4PNwXibmuYvhugz5V5vspTL8VG3NRLCLJqD6uInHbW7R2CGyAlBsoSnfa7JyMr 1DmQ== X-Gm-Message-State: AOJu0Yx+nINlCPMRwwkt7xWuRM6nYFc2Atdx1ANFCW42wBYcoMFsijNJ KZjm/qCC5A4GqYTxGhtvVby4Aw== X-Received: by 2002:a17:907:97d0:b0:9a1:c69c:9388 with SMTP id js16-20020a17090797d000b009a1c69c9388mr13151391ejc.37.1693843969442; Mon, 04 Sep 2023 09:12:49 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id jj27-20020a170907985b00b009a16975ee5asm6274155ejc.169.2023.09.04.09.12.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:12:49 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Peter Maydell Subject: [PATCH v2 02/22] target/arm/tcg: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:14 +0200 Message-ID: <20230904161235.84651-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::534; envelope-from=philmd@linaro.org; helo=mail-ed1-x534.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fix: target/arm/tcg/translate-m-nocp.c: In function ‘gen_M_fp_sysreg_read’: target/arm/tcg/translate-m-nocp.c:509:18: warning: declaration of ‘tmp’ shadows a previous local [-Wshadow=compatible-local] 509 | TCGv_i32 tmp = load_cpu_field(v7m.fpdscr[M_REG_NS]); | ^~~ target/arm/tcg/translate-m-nocp.c:433:14: note: shadowed declaration is here 433 | TCGv_i32 tmp; | ^~~ --- target/arm/tcg/mve_helper.c: In function ‘helper_mve_vqshlsb’: target/arm/tcg/mve_helper.c:1259:19: warning: declaration of ‘r’ shadows a previous local [-Wshadow=compatible-local] 1259 | typeof(N) r = FN(N, (int8_t)(M), sizeof(N) * 8, ROUND, &su32); \ | ^ target/arm/tcg/mve_helper.c:1267:5: note: in expansion of macro ‘WRAP_QRSHL_HELPER’ 1267 | WRAP_QRSHL_HELPER(do_sqrshl_bhs, N, M, false, satp) | ^~~~~~~~~~~~~~~~~ target/arm/tcg/mve_helper.c:927:22: note: in expansion of macro ‘DO_SQSHL_OP’ 927 | TYPE r = FN(n[H##ESIZE(e)], m[H##ESIZE(e)], &sat); \ | ^~ target/arm/tcg/mve_helper.c:945:5: note: in expansion of macro ‘DO_2OP_SAT’ 945 | DO_2OP_SAT(OP##b, 1, int8_t, FN) \ | ^~~~~~~~~~ target/arm/tcg/mve_helper.c:1277:1: note: in expansion of macro ‘DO_2OP_SAT_S’ 1277 | DO_2OP_SAT_S(vqshls, DO_SQSHL_OP) | ^~~~~~~~~~~~ --- target/arm/tcg/mve_helper.c: In function ‘do_sqrshl48_d’: target/arm/tcg/mve_helper.c:2463:17: warning: declaration of ‘extval’ shadows a previous local [-Wshadow=compatible-local] 2463 | int64_t extval = sextract64(src << shift, 0, 48); | ^~~~~~ target/arm/tcg/mve_helper.c:2443:18: note: shadowed declaration is here 2443 | int64_t val, extval; | ^~~~~~ --- target/arm/tcg/mve_helper.c: In function ‘do_uqrshl48_d’: target/arm/tcg/mve_helper.c:2495:18: warning: declaration of ‘extval’ shadows a previous local [-Wshadow=compatible-local] 2495 | uint64_t extval = extract64(src << shift, 0, 48); | ^~~~~~ target/arm/tcg/mve_helper.c:2479:19: note: shadowed declaration is here 2479 | uint64_t val, extval; | ^~~~~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- target/arm/tcg/mve_helper.c | 16 ++++++++-------- target/arm/tcg/translate-m-nocp.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/target/arm/tcg/mve_helper.c b/target/arm/tcg/mve_helper.c index 403b345ea3..7f5b6533cd 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) { \ @@ -1256,11 +1256,11 @@ DO_2OP_SAT(vqsubsw, 4, int32_t, DO_SQSUB_W) #define WRAP_QRSHL_HELPER(FN, N, M, ROUND, satp) \ ({ \ uint32_t su32 = 0; \ - typeof(N) r = FN(N, (int8_t)(M), sizeof(N) * 8, ROUND, &su32); \ + typeof(N) qrshl_ret = FN(N, (int8_t)(M), sizeof(N) * 8, ROUND, &su32); \ if (su32) { \ *satp = true; \ } \ - r; \ + qrshl_ret; \ }) #define DO_SQSHL_OP(N, M, satp) \ @@ -1298,12 +1298,12 @@ DO_2OP_SAT_U(vqrshlu, DO_UQRSHL_OP) for (e = 0; e < 16 / ESIZE; e++, mask >>= ESIZE) { \ bool sat = false; \ if ((e & 1) == XCHG) { \ - TYPE r = FN(n[H##ESIZE(e)], \ + TYPE vqdmladh_ret = FN(n[H##ESIZE(e)], \ m[H##ESIZE(e - XCHG)], \ n[H##ESIZE(e + (1 - 2 * XCHG))], \ m[H##ESIZE(e + (1 - XCHG))], \ ROUND, &sat); \ - mergemask(&d[H##ESIZE(e)], r, mask); \ + mergemask(&d[H##ESIZE(e)], vqdmladh_ret, mask); \ qc |= sat & mask & 1; \ } \ } \ @@ -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 Mon Sep 4 16:12:15 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: 719981 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1685693wrh; Mon, 4 Sep 2023 09:14:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJnG6n+CdUntHiAP3SavSwbVmsV1cl/7qJt/l5W4lIb/+XLUq5HwNDQau8VQ3cC+RGiUtC X-Received: by 2002:a05:620a:3711:b0:76c:d4be:7c93 with SMTP id de17-20020a05620a371100b0076cd4be7c93mr11445418qkb.20.1693844042408; Mon, 04 Sep 2023 09:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844042; cv=none; d=google.com; s=arc-20160816; b=oQdFnk9zN6oz2x98n5nTIXIuqcB1DLs0D+0mCAXa4/L2lIo8uLpBaGboB2MpjGdG9S 0Yumfm0UjnYp/kaHhVDwi44Vajx8lM0p8+5jFk+TJcl9bpOLe5Je70IfEADZ4MpPgngy lmXckJyIHkxGemjUcPtdkNB9b2vIwl4hhj84ZbfYudc/2QQyhg4OYPOJ0ZnY43U2d6AV 1zBuHCmb4Sl/O3Y2a033876ULzudbHYNNbvh5fKh6nJ69BiUpjYLvc1lKOLmLKdQUCYf p3qanzG3MJWfhU5Le9DV/bDsyTCofERz+iWFRFEuL1jyDYZw8uFn4nYlgP92Z0Sb5z3O frXA== 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=/QPTGpqE19ojkMQkX2Y6AuPNy2skSuX4jI00wN8BZsE=; fh=o2PMUEvnB30hy+4Dp/bhATB6EekR8NNupMx5lc/H0uw=; b=tqXwuwkabgLlkiwfw369zlSEyMz08kAcnYK6af4dC2GY6Fi1tm/9+aTFu6sLMmGww/ obDFjGaW/jxQTiVdIuGgc+nxRY6pXmN6KouyXbtfORmTIbsi/BShvX+mz8VeFysZUlI5 qysUGsJV3lDYn0lSCLYNjVjudonbRwDPS3ZVv5U3xOoHxKgF/v3r2vvAntfcsgraasIu 3OLWCVa7lILwWXj8n5bcxxDKvvphiyYBQ5hoTFtGqp658eD3hBD2/8cCuHcAfdMejAIY Gwui5vx1PK26cDQnGwyiWcv8YGIQKqiB7s5ZNMwwVH8Zv/g8IjnKEWpuSZcgwEjCa0vs al0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lfmrOEob; 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 pz3-20020a05620a640300b0076db6edb7a3si6558275qkn.92.2023.09.04.09.14.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:14:02 -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=lfmrOEob; 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 1qdCCE-0002KS-4G; Mon, 04 Sep 2023 12:13:02 -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 1qdCCC-0002JX-3q for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:00 -0400 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCC8-0007T3-Jt for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:12:58 -0400 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-52a40cf952dso2130459a12.2 for ; Mon, 04 Sep 2023 09:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693843975; x=1694448775; 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=/QPTGpqE19ojkMQkX2Y6AuPNy2skSuX4jI00wN8BZsE=; b=lfmrOEobDHYx2daOffwn7VWFk/BOR5dQTb/Urw2mv8NYwlrMaS3CX/6UmcRdof9T5E ZgSnFxRothI+YSWgRZ6RqW54LnOXVCv1h0AFkl/a6c2mYAxouP8qM/ZkBWYdbhjiEjRJ WnWO0vseRHXCEgkgUO0ZYXAb/wzTRMsvHGzJHdcwiss/Ku1J4l88g7BhenAEqJicsm7V snzZ2HLMdVNpuwqkRLfAAEhu2KNiUz+UYpocZRyjkAge7+Addkvrw/o6V0YHod8/YaqF kA95FHvrQoIm8QZTTfaPf3eOZ8DhvcjflPNCS3ByG4LgDk/TrPsOlZ0Kkl94rouAQI72 EB9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693843975; x=1694448775; 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=/QPTGpqE19ojkMQkX2Y6AuPNy2skSuX4jI00wN8BZsE=; b=ScGe5OLinxCWjo6CFUfshb1uoMKdwgMJQTWVEUB09duwwSdD3F+CTT2/iF3DzVegju Re+elZe1LU/opmZGxpMTeotHUynDiYh2Id9hyT7Cy30TnaSvuGiu7C5a5ydYZgBoXTfE +pv5Pv8g4cmuVLYd968MdIkYkuxEyC+JVUYlV/+d7c6M0ORSjbYr0mwu2CLzz4zJvslx e1Jl3WwLoYQcx3YYW2TwOkY4MTOt2comMjEIH+wBPtVbJbc8KOlIZ8ZV7nWE4kQdVwvS cgLOMW1ZYOlVOhFnnozHL5jU3TMWZC70MQxKhKd5UdFCtRuDsQDyBxCDGGnB0qKNAed3 NzFw== X-Gm-Message-State: AOJu0YzWXiHkF7K0AskPaff39wdAilBzUKJHt/dpnBmA0B/DwN18X9oQ Xkx6srEc1cY/o34SYJx2bOkUAe7SRMLxXHo8UAY= X-Received: by 2002:a17:906:1bb2:b0:9a6:69bf:fa5a with SMTP id r18-20020a1709061bb200b009a669bffa5amr599075ejg.63.1693843975220; Mon, 04 Sep 2023 09:12:55 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id g3-20020a170906594300b0099cb349d570sm6327357ejr.185.2023.09.04.09.12.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:12:54 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Alexander Graf , Peter Maydell Subject: [PATCH v2 03/22] target/arm/hvf: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:15 +0200 Message-ID: <20230904161235.84651-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::535; envelope-from=philmd@linaro.org; helo=mail-ed1-x535.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 Per Peter Maydell analysis [*]: The hvf_vcpu_exec() function is not documented, but in practice its caller expects it to return either EXCP_DEBUG (for "this was a guest debug exception you need to deal with") or something else (presumably the intention being 0 for OK). The hvf_sysreg_read() and hvf_sysreg_write() functions are also not documented, but they return 0 on success, or 1 for a completely unrecognized sysreg where we've raised the UNDEF exception (but not if we raised an UNDEF exception for an unrecognized GIC sysreg -- I think this is a bug). We use this return value to decide whether we need to advance the PC past the insn or not. It's not the same as the return value we want to return from hvf_vcpu_exec(). Retain the variable as locally scoped but give it a name that doesn't clash with the other function-scoped variable. This fixes: 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; ^ [*] https://lore.kernel.org/qemu-devel/CAFEAcA_e+fU6JKtS+W63wr9cCJ6btu_hT_ydZWOwC0kBkDYYYQ@mail.gmail.com/ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- Peter, feel free to alter the commit description if it doesn't sound right. --- target/arm/hvf/hvf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index 486f90be1d..0715f8a01c 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -1933,16 +1933,16 @@ int hvf_vcpu_exec(CPUState *cpu) uint32_t rt = (syndrome >> 5) & 0x1f; uint32_t reg = syndrome & SYSREG_MASK; uint64_t val; - int ret = 0; + int sysreg_ret = 0; if (isread) { - ret = hvf_sysreg_read(cpu, reg, rt); + sysreg_ret = hvf_sysreg_read(cpu, reg, rt); } else { val = hvf_get_reg(cpu, rt); - ret = hvf_sysreg_write(cpu, reg, val); + sysreg_ret = hvf_sysreg_write(cpu, reg, val); } - advance_pc = !ret; + advance_pc = !sysreg_ret; break; } case EC_WFX_TRAP: From patchwork Mon Sep 4 16:12:16 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: 720003 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1688781wrh; Mon, 4 Sep 2023 09:18:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGfGxs/fOgbcuNq1YkxsoowvN9vWAyAba8Orj4eEUAgxexJdEYEiHNQJSpEqk8bjUkfF/5v X-Received: by 2002:a05:6808:148b:b0:3a7:5453:a622 with SMTP id e11-20020a056808148b00b003a75453a622mr11195498oiw.17.1693844309866; Mon, 04 Sep 2023 09:18:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844309; cv=none; d=google.com; s=arc-20160816; b=GB8bNAylpiDPewWjcHhTIWkW95kBDZSOyMr0sBTdObuvI0qqmIHJuz2I5HpOHFWB1w XHGkKIg1aMGEbzTMjNFf90zKXtj4D/Dek9/boAP4Qqoe5T5l/OP0FS+eZ3x+QjD8GB0I w6z7c0nh30UnymObTZ3eZ/tGX20renAyNsi5fVwKs/JswibZYOuIgJkqdNDK2dHqvtVA 7OC2stHjG9G9Vj4C0iiDgCp7zdPASvnyCljv4td9lXh070CQ6eF0sdIhnYQjZs2NoABq QI4KU8U5qvsKc4QmgIqGM6mlEB9FmvoZOjk/Iu2Db6WgE9Lfbl0PZGF9NDwIWkXaS+W2 ljIQ== 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=F/1842D82jRvos7krVyRFuFf2x22S2qxPQWay0SVXOg=; b=Vd67thGLBFzP9IlVS/Iqq5ENcHQVpmnDEkD6WpsBZ55qM2tLm3oMnDE0F0b6bcZtaI E+Lxqe8yw3ochTj4tU5r1db9qpVxckIRmezvsX3iAsNgRFPgmUFSc/FfF42K8RuUoxRL rj5XxDdPiQLtPy3Tsplm6fXqm4aOHVYqP4JDs4PbCdTN8hQibBHujHW9vNqqQH++05tE C3MGjnF7YpNmAzuzHrkv1dqZ9OOME8w83hnZG/4VmKamJr8a+3kjbMkkzgQqKOP4bakz dS+XxBNh9WFyIJ9lZH3BchYouxcjDSonEvpXRBWWY6CPqrvf9CNPcXEmDCU6hHaeRzPw 3TgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="QEUf/TTt"; 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 o14-20020a05622a044e00b0040365c02841si6402654qtx.582.2023.09.04.09.18.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:18:29 -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="QEUf/TTt"; 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 1qdCCI-0002Lx-Gk; Mon, 04 Sep 2023 12:13: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 1qdCCH-0002LW-31 for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:05 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCE-0007Tp-Ll for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:04 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-52a3ff5f0abso2156891a12.1 for ; Mon, 04 Sep 2023 09:13:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693843981; x=1694448781; 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=QEUf/TTteNX5kzgU31y0Soiq4jioE4wkhZsLdKOHz+bWRwDzyb/c+M6lBVOXHn03op o+17G5DnKrkz1Hmm2uKiaWI1DjCyzvY61VzJ4b4tPMvtf15cmlS07Tg+n+9N/b75S0u9 hfOTqERI/Z+WBoKu5ekuGEfg+662CJNe5pwFQq/cca5Xv93DdL+qcf7C48oaWm91Se1J v3GDtpjKOC2P7Tf5seQOLbi6T1Cbuol+LAVh+SZYZ7dqxGeLBgW7NXimL+moWkCAXpcy xSa2cTGWrTX17aaJ/2gs8bSnvXuN4z4NvuVPsSPevyR9eKNvHJyeclEVTp4yqe+wNfWr yu6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693843981; x=1694448781; 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=ESEvnW7OGe5gJoo+5dm0pGNbGBpVPOXuceLueGI3rKxqzSgurLB9JJ6dNHnsHWHIhN 3C6M6ZUb5VgU5CFOdhaxM8C8aIR0UV6k1MXq/VBD0d1wO18LZKGea5VKdIQ6TsN96nJ4 BBrX+DzVS59T7VOWV43C3/Gu5lgY29QuQ/b5W+Jb7oQu2gZnr+SXaNDv/kXzb7o54mH/ a+s5kWbUqB3Fh2l1Jbh9WFVf3b56Ei+xNx5rtn87unCEzHcfXguKxEPYjdvMN49nvP9v nSDWKZmuoc4iK4qr950k6/CmowTVTDqqQEYVPJosGc5B0wj1sgkrDl0KBSbNT5W9btOg +s4g== X-Gm-Message-State: AOJu0YxPS8nLTYngWjAnnG61MOwGr1utRjYWherukoWMD/f9QlBB5u8p g9DnJlQSkDtrzhCj1jUBXyquyQ== X-Received: by 2002:a17:906:f252:b0:99c:fb44:d4a9 with SMTP id gy18-20020a170906f25200b0099cfb44d4a9mr5892300ejb.77.1693843981145; Mon, 04 Sep 2023 09:13:01 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id l13-20020a170906a40d00b0099bc0daf3d7sm6415230ejz.182.2023.09.04.09.12.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:00 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Aurelien Jarno , Jiaxun Yang , Aleksandar Rikalo Subject: [PATCH v2 04/22] target/mips: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:16 +0200 Message-ID: <20230904161235.84651-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.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 Mon Sep 4 16:12:17 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: 719982 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1685701wrh; Mon, 4 Sep 2023 09:14:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3G46R1SCl04c01SZNuuMZS9Oo3yxyVVHxZ1ahhMUza3NxWiIWdVRDKdzTBCXub/JK0k+1 X-Received: by 2002:ac8:7f4b:0:b0:410:9089:6b74 with SMTP id g11-20020ac87f4b000000b0041090896b74mr15351240qtk.15.1693844042785; Mon, 04 Sep 2023 09:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844042; cv=none; d=google.com; s=arc-20160816; b=kxk4Klpmffh40TR90WFVPJM9myAxOhuc4mySAq7+D2ctevKUtxT0FNc/tGjMvA5R59 pXW6N7HSMlNTlb23s6QQoraa7zNCmz1R6FnBam+N+NYZjdAaEADrsAKAfUdl2ysO3khc 9ETyC+iC2iRp4oJ/2b/BbxgX08FkUrn2DzO0qbgyt9o+BTHxNNBUZ/ueGq93+lCjT8QZ FzZD3ivv8wu0PTDSy48a57KfcsCP4duFBsEa6/pFoVUnyfU5YehBvB3hphRDwSVYwKs7 T7Zi+1RXznXBOxMYr6S65r/UH1/KeHvVUvw5jHrKpsP1CUf5ySLZo/8t8j/dmCWRC50G 4hww== 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=6ydRFdPTad34foOKByxz/L8A5535uYhpZFQ3Nd9iHtU=; fh=Y5QLCnrAE1kngY/zxuigQpRa/cTwRHxoR1G0QPRn0gY=; b=oissqcQyRoj25xE1/0prR+qFZ2qI3aSkHxGwC2xACBne0GjYmJoMm4IWyzYiyZ2arZ a4iWVkONxBljAq0sCrXTr8nZzH9diBQUg8OjdQMw8OUWBFKLQauiDPFwXlZSODF2oqqs JoO04HSSUz7Y9C2ov/GavgkT9AkBEaxVUvZeeJ+C2OjnCyUkuVM4dO0Hsm1R0IIPVQA3 L0jmNEHEq2BBj/uOWQavyepKl7Ug58UB9vRJ0G4Ajzsb2mTYyu47x2GQOoyukgr5y6P2 DcamJPhLbLFsYVGCyfCTUcAIYsM70C/rKKxXfv3RbaRLGRaf0uH9ki0IzD+tmFIYkDCn VB/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aKxwAC2L; 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 d6-20020a05622a15c600b00410a5dc2fa2si6872132qty.565.2023.09.04.09.14.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:14:02 -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=aKxwAC2L; 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 1qdCCN-0002Ns-Ps; Mon, 04 Sep 2023 12:13:11 -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 1qdCCM-0002N6-Bl for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:10 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCK-0007Uf-0Q for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:09 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-99bc9e3cbf1so348967566b.0 for ; Mon, 04 Sep 2023 09:13:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693843986; x=1694448786; 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=6ydRFdPTad34foOKByxz/L8A5535uYhpZFQ3Nd9iHtU=; b=aKxwAC2LMNhxgnyaVkjMufgvx1SR/zA+KbMnu0NGLDzLO4F9Owdx55w5Rk07GEbpyk Qfkpfg8g9roNYsYhXg+5Jxt9oU4eraDn7QwdYhLir6UG8zL/5W5qmxSpM4ZMvGsUccmv BURTrI+4jkDGx5ZnEw8/Y9vjhPH0UGFX/4i/G7LyiBQPc+nlMu7JPdRkRSIBBxeRtZom tAnR57P0Vqs4gjhJDF1RcS46l9lk+NcpUAVadULHbSGaOgDmky2iULqcypirvdjKQQLu vVHQOo9Mixg1OaAlMjrPxO1sIPtp6Y+oOAKo8PSmnVR2L9LTD6ZR5wvpzjn/mfOT/t/z iIqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693843986; x=1694448786; 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=6ydRFdPTad34foOKByxz/L8A5535uYhpZFQ3Nd9iHtU=; b=REAJBAM5eD8q8NvWolyRcZSwYA+9lPX0p2yJ2jb3+0Bm1d7CWc+OXqw+SEh6gQxdk2 wqkgxRyKuBtGRElNbqvQH2GAdTKxt+7VT2mFdNH9Ys5womGgv1GDgHMIRKK1QPnRVz4w DvAB/NRHrs5zX3ncYjOcjkvoyHk+xSshkCVIQOxIoNQwEzy3bu6tA/QKXod5ZY+oMUCZ vFpqTzsdKFWOpZZtdPpVNN+kkX6014gc3VhmrBI/x/q5RiTIYf2F1FFwke92MzAyX1J1 AMA/QuDCEaO02lOHNNKsGLF0ORKkzzZK6kSLjnje+oUlN4M0vT9g1FsEPbLs3nrmu7Zh I4wA== X-Gm-Message-State: AOJu0YzcrDA6xF3oC8ewCYFMuhsWqmXpZs+GrxH78B+7vMOBvyDy6deu iNhdyp4cLl3p3cXSMfIkdZ9qQA== X-Received: by 2002:a17:907:a050:b0:9a2:26e4:a5e2 with SMTP id gz16-20020a170907a05000b009a226e4a5e2mr10399094ejc.25.1693843986760; Mon, 04 Sep 2023 09:13:06 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id g2-20020a1709064e4200b009a5f7fb51d1sm6294014ejw.40.2023.09.04.09.13.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:06 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Peter Maydell , Laurent Vivier Subject: [PATCH v2 05/22] target/m68k: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:17 +0200 Message-ID: <20230904161235.84651-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fix: target/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 Mon Sep 4 16:12:18 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: 719984 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1685727wrh; Mon, 4 Sep 2023 09:14:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSCB7DlZlhNUwKcwZ3JZ1eMSWGhODQOTcRHmZ93qwwJ2qLoYNMiDXWlcz+urbS1RAWI/Jl X-Received: by 2002:ac8:7d92:0:b0:412:24e6:a485 with SMTP id c18-20020ac87d92000000b0041224e6a485mr12831580qtd.2.1693844045232; Mon, 04 Sep 2023 09:14:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844045; cv=none; d=google.com; s=arc-20160816; b=CjvvDpmqjKlT6G6a/ZiH/1Ip9jheqN6urQRK64P0rHFzFG4LsRbn17srt3Q3wYtoNP Ey/qCvVMkTZ9bHzaxF5BFl3RIvYinx3VD4KEX8qhNuJMOseUuSmwzwQ8Hhjecus872yZ tYkEmDkeQL57W+V3MJFylXCHZXVyvPi4fR6KKJixLarS2cSGXuP+OVvKqp292dsqeTxQ x6EyN/8s+zg7zYp9IpXs0APtOQL6lWjxbwISXe5QLTtqqLxmeIla8bMoLP6B2pxn6NBF g8RMoMudZYiLM4Sc2RcOjnNbNag7dq7t84u7oMaETRznmDnibiaeKEFUWrIC5fhxfJvs GLBA== 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=x4jIrB8buoZ4kzwhFvV0xhUjYKmY274vhbfo/mB1lCg=; fh=9aWhNTzWuGnoulTjdeFX0+0UCLzagAXfy6/A1sUjfOQ=; b=Yfruefzi6K0J04L+WN8fN7zV06R0KAvqOp5GIOpIZ1N1L99PXdN1QT0hGR1kJQABNc 5EENwZpbdPUHZY9Cp4ACs6YotJn+NrOtVmXLY33S8gIV240c4ept1SzrM1KipSQF5gCT Z53UEuvS1GhFGsCng73S1Me1fZ18tvhpzjehu6H9VZrVbPKcedNM2KcY3gdrOZLmSrss n/3ctJSICntGkaYEocA6COKopMe1QB7P+KhVlpjmsmqEW+sWaRtqrRLqzNgxOcdUc8m/ g9PvViJAglRqVdt9vXxqku3Wshkw8ISS3PwHJWzow754N3hEWhoRVYeic6DxxUaR1bAf dyvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=js5lkQL3; 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-20020a05622a149400b0040fbc9a3257si6524893qtx.115.2023.09.04.09.14.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:14:05 -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=js5lkQL3; 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 1qdCCX-0002Zd-3Z; Mon, 04 Sep 2023 12:13:21 -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 1qdCCU-0002Xe-NB for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:18 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCQ-0007Vm-Sq for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:18 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-98377c5d53eso235544866b.0 for ; Mon, 04 Sep 2023 09:13:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693843992; x=1694448792; 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=x4jIrB8buoZ4kzwhFvV0xhUjYKmY274vhbfo/mB1lCg=; b=js5lkQL3cJNKZ3IsTjZb7hnuCT/Ea2PDHh7Gv3IevnDVVPJ3+IsbsceqGbagQgQK4g iNrUoZk+ulEP3GDeyTECKFG2Ka7M50tLBPWuJDWMG4KcdAdAa/tscs4ZIJtS7+HjGeFU w5u1V3ev984RlxkI7hkt30xIeI3yaIaC/xQpAx1+LX+sWPPy4BaWZdGQlao55Mu/Vk8f TyDCv7JsmoqaI0pjDmqGFhb22M3KqXlR3/uluzaPDuwakjXSKiqBB1c4rPWXgJT9Pr6e 004BHCYVvoa+GK/j92UnBtgOiUr+J0e+TH+jOWHa30BL3j/i578Hs6J9XliGt7xikn3n ANew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693843992; x=1694448792; 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=x4jIrB8buoZ4kzwhFvV0xhUjYKmY274vhbfo/mB1lCg=; b=C1aqBAKPEm8EGRj9MV7/ljx2p8vkCBwQBbFHRVD4fIA0p5bPwXxMR5uuJdA/DDupEh EMx07sI/rNsvaD3XJaqTpQlXf8vVBQOGGtUy0LN0Qj3P0tOtKysoyRiT71Evj2Od4bST 7ghPzdTWztafPwnc9IMWZO4ruavD2AQZKM7K5RLxY0Aq4sQFu0TGJKjGIDt41TnkYRZ5 wf2103MSy3x3lmdf3O0ANMbDGGCfOq/S6I0wrGkkqeDpFo0UIi36FfWurBa3+xgszfvL 10e2jxh9ec0mDhus0nYhBnE3apon3XQhuptskz/HcTlbHfSBBaClC5F9LfjmGltZhyZd I5Ug== X-Gm-Message-State: AOJu0YxMP1CSwKorsYSlyQRVj8QMECNEYFm6z6mDYw3+FW/GrelyXoe2 IDGHgfV4zhEEDigvd5uNzk6lsXPYYGRKmPVnxZw= X-Received: by 2002:a17:906:cc0f:b0:99e:f3b:2f78 with SMTP id ml15-20020a170906cc0f00b0099e0f3b2f78mr6530005ejb.67.1693843992290; Mon, 04 Sep 2023 09:13:12 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id e19-20020a1709067e1300b009a198078c53sm6305559ejr.214.2023.09.04.09.13.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:11 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Bastian Koppelmann Subject: [PATCH v2 06/22] target/tricore: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:18 +0200 Message-ID: <20230904161235.84651-7-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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/tricore/translate.c:5016:18: warning: declaration of ‘temp’ shadows a previous local [-Wshadow=compatible-local] 5016 | TCGv temp = tcg_constant_i32(const9); | ^~~~ target/tricore/translate.c:4958:10: note: shadowed declaration is here 4958 | TCGv temp; | ^~~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bastian Koppelmann --- target/tricore/translate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/tricore/translate.c b/target/tricore/translate.c index 6ae5ccbf72..9ca211b2a8 100644 --- a/target/tricore/translate.c +++ b/target/tricore/translate.c @@ -4962,8 +4962,6 @@ static void decode_rc_logical_shift(DisasContext *ctx) const9 = MASK_OP_RC_CONST9(ctx->opcode); op2 = MASK_OP_RC_OP2(ctx->opcode); - temp = tcg_temp_new(); - switch (op2) { case OPC2_32_RC_AND: tcg_gen_andi_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], const9); @@ -4972,10 +4970,12 @@ static void decode_rc_logical_shift(DisasContext *ctx) tcg_gen_andi_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], ~const9); break; case OPC2_32_RC_NAND: + temp = tcg_temp_new(); tcg_gen_movi_tl(temp, const9); tcg_gen_nand_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], temp); break; case OPC2_32_RC_NOR: + temp = tcg_temp_new(); tcg_gen_movi_tl(temp, const9); tcg_gen_nor_tl(cpu_gpr_d[r2], cpu_gpr_d[r1], temp); break; @@ -5013,7 +5013,7 @@ static void decode_rc_logical_shift(DisasContext *ctx) break; case OPC2_32_RC_SHUFFLE: if (has_feature(ctx, TRICORE_FEATURE_162)) { - TCGv temp = tcg_constant_i32(const9); + temp = tcg_constant_i32(const9); gen_helper_shuffle(cpu_gpr_d[r2], cpu_gpr_d[r1], temp); } else { generate_trap(ctx, TRAPC_INSN_ERR, TIN2_IOPC); From patchwork Mon Sep 4 16:12:19 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: 719985 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1685803wrh; Mon, 4 Sep 2023 09:14:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDTcvPXJrP6If3wrlKvhU5ETbumz+Qbbd4BQLdXgv3iZe/19Wmf5UWQUlcWNKkvhCNgOfg X-Received: by 2002:a0c:f30e:0:b0:649:869c:8dfc with SMTP id j14-20020a0cf30e000000b00649869c8dfcmr10400970qvl.50.1693844054992; Mon, 04 Sep 2023 09:14:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844054; cv=none; d=google.com; s=arc-20160816; b=T/hk5hBXSJLwhaBj6CpDtRTbYGIkojBd1jHL2OelaviLjygedXLdQafssPzNCF/Od7 nCHz75p4M+i0y3gc+lLDagJHvxmrksnakRsgKJ7k4ZP5cqr2ASjd3P/7bELV8Q+xaBkB nNwUm4kxvuPeKUFZqlTG9Bay+KinaVhzhXClCGrTbWqqFFHDo0g926a5vZk50LipaD0X 4NA+MwWMqH4Kz0q35jl1oDx0uFLq5UBAE3ASTMwEBxyiQPVnIRwMUAahrJ3Lg3r51kgY nhWlDTnzXxkRLGAWx5kcHOCBUqJiblMPgNiG67nkDuFX+UiDcDlpoCcvMPLt75DIcuOB nvYg== 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=LlxpFbCHiWjslLmUxZfZSQm0srNjNWhApIJsD1WDg2g=; fh=JiW2z4nACjvivIcmH8UztD+5iohCy/JDZINC166FmPE=; b=tlKoGN18DtrHtuTjAiuujFR372olquBd0PaTMEIxhrK77Rn4TJed3JyIrfVtGDZ0UQ OFIAirjHvFpnnAivzJrkSImsTGWIkJHGMlyIHMBW+LVzb/c6th821ow5YKbuDR/hX8j6 xyJutXxEEyey/LC2QvvF2NHSp2tBjnZIHXxJIZIJBloCwPT8yd5DfkFmNdZNKqD1OD3B eG+7tT5GyQ1eT/u0oRK91bc8z95VCs89aatwKcpU/4ffgv6M9qnaNmmIBq86v5uh9bjL FME134dFPB7O6q4Xb04BjiImiKbgY2PDFKulWq+R/KCaxGSD8AS16Opi5mtQkXMOp/r2 +lYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p5vKNy9E; 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 b12-20020a0ccd0c000000b0064b9d02081bsi6657491qvm.26.2023.09.04.09.14.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:14:14 -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=p5vKNy9E; 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 1qdCCf-0002kh-2o; Mon, 04 Sep 2023 12:13:29 -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 1qdCCY-0002bg-Ue for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:24 -0400 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCV-0007WT-FJ for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:22 -0400 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-52c74a2e8edso2352982a12.1 for ; Mon, 04 Sep 2023 09:13:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693843997; x=1694448797; 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=LlxpFbCHiWjslLmUxZfZSQm0srNjNWhApIJsD1WDg2g=; b=p5vKNy9ENT9lXx0QojN/p20L4bgdRNkS023pkLbgSZDcr3aXUF0Q9sovdOJca5/9JD p4xEB3DdkUjbhh3a8tGuT4AuvCe6mD+kwy9eC0KiV3+MKDcZlLdw0Srfv9br+Zvd3juu krz6e6+Lxi+SNcc275ffqOdyZ6qXqLzoaYO0FHTtdZx2EPRUHnqDRp9p7c7wcHjWMkRQ 2YO1H+pYBMAdMcARS248i18DHa7sDy4enQwJSLDKPqtLEPSV6AjGWBtK2HXZiWoVUg3J HsKHNbE8M46dXkDdJaThZUW2Fv3IK+FfZhNpbSm0LjwpQsL08dS6LkrSigE2U8/5rO6F qxDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693843997; x=1694448797; 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=LlxpFbCHiWjslLmUxZfZSQm0srNjNWhApIJsD1WDg2g=; b=any8bEy9L5CweQD9bx9j6CPqbaL2NvILjynPowkcFZF3kUo26CH3V5AyjwGUDR0ytw 1+utCejKbzlCLg5C00zVxrl4I41NWIODV7fYhPfnokPrNihpox5uFivAet1IF7tNgU+G +UOIH2mtKda6CtveZtMc9CuhNufJmeQ1yW1syO4dbXKIjtEqxxwJUGLZL8YuUf45IDNu d4Kx3wi+DRo1SCI6yQIgoJu30yF2r8ONSSCN6UyeiKw+N9iFT02QZnAX+XKh7K6SLVJt EwZCZYTEAmT/8kjjCUnbz+HCNZkt6v4ZiZQ90WN18HD3pEFfDAdl32ZjNilVSoiGHbMZ Qddg== X-Gm-Message-State: AOJu0YzhlERNW4Oo2zjqSQJM16CYs5Ri5fVBI4BqB+1n8rFo7gCgaCf+ MdXNBFoZFuy+zZOaWKiKYz4i6g== X-Received: by 2002:aa7:d615:0:b0:523:2e63:b9b with SMTP id c21-20020aa7d615000000b005232e630b9bmr9196767edr.24.1693843997702; Mon, 04 Sep 2023 09:13:17 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id f5-20020a50ee85000000b0052595b17fd4sm5941517edr.26.2023.09.04.09.13.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:17 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Peter Maydell Subject: [PATCH v2 07/22] hw/arm/armv7m: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:19 +0200 Message-ID: <20230904161235.84651-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::533; envelope-from=philmd@linaro.org; helo=mail-ed1-x533.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/armv7m.c: In function ‘armv7m_realize’: hw/arm/armv7m.c:520:27: warning: declaration of ‘sbd’ shadows a previous local [-Wshadow=compatible-local] 520 | SysBusDevice *sbd = SYS_BUS_DEVICE(&s->bitband[i]); | ^~~ hw/arm/armv7m.c:278:19: note: shadowed declaration is here 278 | SysBusDevice *sbd; | ^~~ --- hw/arm/armsse.c: In function ‘armsse_realize’: hw/arm/armsse.c:1471:27: warning: declaration of ‘mr’ shadows a previous local [-Wshadow=compatible-local] 1471 | MemoryRegion *mr; | ^~ hw/arm/armsse.c:917:19: note: shadowed declaration is here 917 | MemoryRegion *mr; | ^~ --- hw/arm/armsse.c:1608:22: warning: declaration of ‘dev_splitter’ shadows a previous local [-Wshadow=compatible-local] 1608 | DeviceState *dev_splitter = DEVICE(splitter); | ^~~~~~~~~~~~ hw/arm/armsse.c:923:18: note: shadowed declaration is here 923 | DeviceState *dev_splitter; | ^~~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/arm/armsse.c | 16 ++++++---------- hw/arm/armv7m.c | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c index 11cd08b6c1..31acbf7347 100644 --- a/hw/arm/armsse.c +++ b/hw/arm/armsse.c @@ -1468,7 +1468,6 @@ static void armsse_realize(DeviceState *dev, Error **errp) if (info->has_cachectrl) { for (i = 0; i < info->num_cpus; i++) { char *name = g_strdup_printf("cachectrl%d", i); - MemoryRegion *mr; qdev_prop_set_string(DEVICE(&s->cachectrl[i]), "name", name); g_free(name); @@ -1484,7 +1483,6 @@ static void armsse_realize(DeviceState *dev, Error **errp) if (info->has_cpusecctrl) { for (i = 0; i < info->num_cpus; i++) { char *name = g_strdup_printf("CPUSECCTRL%d", i); - MemoryRegion *mr; qdev_prop_set_string(DEVICE(&s->cpusecctrl[i]), "name", name); g_free(name); @@ -1499,7 +1497,6 @@ static void armsse_realize(DeviceState *dev, Error **errp) } if (info->has_cpuid) { for (i = 0; i < info->num_cpus; i++) { - MemoryRegion *mr; qdev_prop_set_uint32(DEVICE(&s->cpuid[i]), "CPUID", i); if (!sysbus_realize(SYS_BUS_DEVICE(&s->cpuid[i]), errp)) { @@ -1512,7 +1509,6 @@ static void armsse_realize(DeviceState *dev, Error **errp) } if (info->has_cpu_pwrctrl) { for (i = 0; i < info->num_cpus; i++) { - MemoryRegion *mr; if (!sysbus_realize(SYS_BUS_DEVICE(&s->cpu_pwrctrl[i]), errp)) { return; @@ -1605,7 +1601,7 @@ static void armsse_realize(DeviceState *dev, Error **errp) /* Wire up the splitters for the MPC IRQs */ for (i = 0; i < IOTS_NUM_EXP_MPC + info->sram_banks; i++) { SplitIRQ *splitter = &s->mpc_irq_splitter[i]; - DeviceState *dev_splitter = DEVICE(splitter); + DeviceState *devs = DEVICE(splitter); if (!object_property_set_int(OBJECT(splitter), "num-lines", 2, errp)) { @@ -1617,22 +1613,22 @@ static void armsse_realize(DeviceState *dev, Error **errp) if (i < IOTS_NUM_EXP_MPC) { /* Splitter input is from GPIO input line */ - s->mpcexp_status_in[i] = qdev_get_gpio_in(dev_splitter, 0); - qdev_connect_gpio_out(dev_splitter, 0, + s->mpcexp_status_in[i] = qdev_get_gpio_in(devs, 0); + qdev_connect_gpio_out(devs, 0, qdev_get_gpio_in_named(dev_secctl, "mpcexp_status", i)); } else { /* Splitter input is from our own MPC */ qdev_connect_gpio_out_named(DEVICE(&s->mpc[i - IOTS_NUM_EXP_MPC]), "irq", 0, - qdev_get_gpio_in(dev_splitter, 0)); - qdev_connect_gpio_out(dev_splitter, 0, + qdev_get_gpio_in(devs, 0)); + qdev_connect_gpio_out(devs, 0, qdev_get_gpio_in_named(dev_secctl, "mpc_status", i - IOTS_NUM_EXP_MPC)); } - qdev_connect_gpio_out(dev_splitter, 1, + qdev_connect_gpio_out(devs, 1, qdev_get_gpio_in(DEVICE(&s->mpc_irq_orgate), i)); } /* Create GPIO inputs which will pass the line state for our diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index bf173b10b8..1f78e18872 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -517,7 +517,7 @@ static void armv7m_realize(DeviceState *dev, Error **errp) for (i = 0; i < ARRAY_SIZE(s->bitband); i++) { if (s->enable_bitband) { Object *obj = OBJECT(&s->bitband[i]); - SysBusDevice *sbd = SYS_BUS_DEVICE(&s->bitband[i]); + sbd = SYS_BUS_DEVICE(&s->bitband[i]); if (!object_property_set_int(obj, "base", bitband_input_addr[i], errp)) { From patchwork Mon Sep 4 16:12:20 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: 719995 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1687811wrh; Mon, 4 Sep 2023 09:17:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGH46Clg0ZTZponFprfmCTQPdcmLkd0LyLX4dpIS5FW+hvLy6smSnvuPshf1ig24uW/wnS0 X-Received: by 2002:a05:622a:1105:b0:405:56bb:343b with SMTP id e5-20020a05622a110500b0040556bb343bmr12851989qty.41.1693844242250; Mon, 04 Sep 2023 09:17:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844242; cv=none; d=google.com; s=arc-20160816; b=BaFbSRlKdGrtUmxWKgv7T0ufCBmOV6lNc7ZnObsbz9ogGy9kvs2EtNNPa8AJoFFvd/ Nwz3Omluy2zHdEpxOiS17/Jr+DCuktiwO9pZuwinUHBP9ooKSoiFc9tjTjQJ4NnN8nWP lU8ltM3VTtJm06XgzYTlwgXZOc2KKn8pfUv9aI2d0pU/ZaU3WaVoQYtND+7XnoFIzFVv ewAezyga4eUg/Q9vPjFU8rbT7aQTZLbsAXLcTK38L/VR58cwJ5cE/I0BGwNhxNIoZkHP moC60vwKGCnE//+4uIO3nQgW1YRnBb8KJv9IXvQxbESHMuJBgvFSW7zE5dvZqUvEKkDj 4V0g== 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=JNPPdU1CGcusx0u924J/XsX1Bvc+NbZUFtzocy+B04M=; fh=JiW2z4nACjvivIcmH8UztD+5iohCy/JDZINC166FmPE=; b=deNp9mwsIkX+kOtI3/l6wfHnfex7NFGizX47Hi0Q5eVjr0xfzJHn2N+xNvVhUuVL6r t9PAtmP5EOA4w0zC7wqQzlioSTLwemH4veWtM/x2aih6Bzj/6Il675te4iUVLbRNRkUq 2E9lzWPpu7wAuArDVZhoEgV/mdikJvU+Uw/PC+h7jhyfrDigxWmdejjNdnVpXIgk26J5 Zvm4LR5zijVhcfVs3IvqaewAfYyUvlx8qfvCLUShGhb9YlQ2fKCdf2yPO7jMPdQZxNst H+oA447+KL0CSRX/CdL7Gt8+4Mgt3svIavk9lkFLD6dtTgmR3IDaQCVm1xZicEq5bhCS ZDCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iI/gjPg5"; 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 9-20020ac84e89000000b0041229ef137asi6427777qtp.549.2023.09.04.09.17.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:17:22 -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="iI/gjPg5"; 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 1qdCCh-0002o0-Ji; Mon, 04 Sep 2023 12:13: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 1qdCCd-0002hv-Ek for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:27 -0400 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCb-0007XZ-9x for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:27 -0400 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-99c4923195dso250222266b.2 for ; Mon, 04 Sep 2023 09:13:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844003; x=1694448803; 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=JNPPdU1CGcusx0u924J/XsX1Bvc+NbZUFtzocy+B04M=; b=iI/gjPg5YC9lf+lJZE/YZFoOKeIgHxt0kqREw0hBNgvKNLxXV6Oq0Ngg9J/eU+uuKl OMjo8ECrTPGdPoTGMo7Cmdnt3KjSfsB2YaLe8He6gwmyYo2I2BtesPkCC+q43kqoN/XF sqytf1iwj2RwobE20Jw1r/O2pG99VudebmcqsZUxalLbJcS+N5vHkPcirp52eShCRByi VpXm3C4NOYS4GQDoc3PR86/LGsrhQJbkPHB1pTkIXjn3DNklgfSL6IO3iZqLRXYTTy3N D8Zn9Nv3xK8+nHKf1ZXNPt5qyQmF98WW/A+6WrMpNJQPYFotyEhA1JRFTmJdfeu2Tea3 /mNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844003; x=1694448803; 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=JNPPdU1CGcusx0u924J/XsX1Bvc+NbZUFtzocy+B04M=; b=IGJdQw8/oI6TRFmVzxa6r2KFZBqA6CZarM3/SIRNH9F57+3iuXBQBDeq7UvECOYx6s 0hiRxeSTXrfPqRkLmuzINi2hNPso4jV1sLmTKQX1iqp9HNm/V+QyPevLtdeUwmzFl/iK iR0enFbU9KpbPvctO9Fe/pZbsX3RzGivv9gZQZWcGelSurc4FtvHvc+WZpEdiC5vY8zE hiwaqzvJ52d5FECco+oI90UhnU7wDSy/a2npilrqSPRdrq7mQ61TgCAz6D47T5/acgA/ zPA/EfaPF6pDL4ibSJpZQuH9t8EL3XZurCEDuzPpKTDlPEEcRaylITIeWmx6v2qr7jeP 06Ww== X-Gm-Message-State: AOJu0YxDoENlrYA+fAOWYVnS5Tm9EkQ6n10+OlNo53N9BjZ6ft1zB/NU lC9Fe/d4VD0dOHJhtW58Ha9m8f328ICsqNw8sU0= X-Received: by 2002:a17:907:2ccb:b0:9a1:e293:987e with SMTP id hg11-20020a1709072ccb00b009a1e293987emr8525152ejc.50.1693844003111; Mon, 04 Sep 2023 09:13:23 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id u23-20020a170906951700b0099d0a8ccb5fsm6383573ejx.152.2023.09.04.09.13.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:22 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Peter Maydell Subject: [PATCH v2 08/22] hw/arm/virt: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:20 +0200 Message-ID: <20230904161235.84651-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::636; envelope-from=philmd@linaro.org; helo=mail-ej1-x636.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/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 Mon Sep 4 16:12:21 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: 719987 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1686214wrh; Mon, 4 Sep 2023 09:15:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExKcUNuW4UVWb2Gqyh7AYbFy5ifthy/565AtwCrlOm4Mc0Cxfr9CCyUu4JktEnarq5oiKs X-Received: by 2002:a05:6358:590b:b0:13a:6cb:4d91 with SMTP id g11-20020a056358590b00b0013a06cb4d91mr13072702rwf.7.1693844105194; Mon, 04 Sep 2023 09:15:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844105; cv=none; d=google.com; s=arc-20160816; b=cUS1Ovqye3Ez5J1xxVf6s1LNkeDfLPFXlZdZs2ugjlAyynPyYX9qxqdGRCZkJf9nIC aErZCy5mFwI2F7VtIbEbDWdArll6g2/xECkzpkswim2kfKRXaBjx4bsSFbdC930N+UFt 7coKpHZj2RiWUtZ/lxUJ1RthWTPA+26YWg1ol76BNXGRNJKbiJnOu2MrBongH8uDPLW5 asJNOS/T/Gn6ui0spXwvP1P2GkArhimeGQHfHefnK1+yLwOpw1FMR0ARTbRINs7w8IRC YdSSo64eIRdzyW6X15rsSrqOKnjiciNwx1a07AEBlYTbz3mijOU1dY+9oYN/lJNFA6IM Cpkw== 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=F0uZGrdkSgs5HoqGdgWfurGjAeEUVFxD0ugElwq2vSc=; fh=6XvMCXPGpY4BYBr5ITls9/XOWCEa37AzUDKi89HVoNE=; b=DXYWd2d1cg4le4iB82Iv7Lp3eGRKkryoyqYspKgNE3XEIioie/Bj4PrltM9MoK6Ipc WYtFGKkm0PJnXF4mqv+vvu28Jp5JZFWTkO/ZsRaD/Ebcc/V8PNee/nyv1hkTOnQsYMlx y7dSgbGRx+Spo2Q8MpaUM+L02EdoDY1wO+6lbV4+1YnfaoAPTtsjP4wMPy9mRWOL2PQw LELXj48BGo5UQyI70KrPjPvaNRs6KIs5BtSPvCboIbyQcQECFq15O/S+4oMlLD2BwYJH DzpWyKteC4Cc0wQ0xzbDBccWBtUBx2iL7OWNd9Xvlrk5IrRA78OW8qBvKJLj6dFwg549 W2VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fGaeBDz6; 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 d1-20020a0cf0c1000000b00635db656f7asi6622951qvl.293.2023.09.04.09.15.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:15:05 -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=fGaeBDz6; 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 1qdCCp-0002rj-N0; Mon, 04 Sep 2023 12:13:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdCCl-0002pp-9L for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:35 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCh-0007Zx-4L for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:34 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-522dd6b6438so2047625a12.0 for ; Mon, 04 Sep 2023 09:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844009; x=1694448809; 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=F0uZGrdkSgs5HoqGdgWfurGjAeEUVFxD0ugElwq2vSc=; b=fGaeBDz6BeK83pMOfPUigZjh5JMCFiUrnDcZu91OGQVK3L9LfOqh6DDuR9eICEhjii 9o1EgJqhSmhbYWJpN/93/gPIGGDsRubRsB9/Xeclw8YMaBaQL7vr78zXc7TJh2aqJT4N ZcRbbLNAG0pOEm6mfmnOw1YtrXaNKI484PrMtc5JO/aEhvlczf0LLzyxn9+USTW1k+jx mDbxcU+O3wUMpKPMvqwEB56UjMDg/vFSShhjTWqr5bmHPkVvHSpq+tSjO0+6y9HHxNlT 2sPqmqRbn+wNgaFwG92uoyJYbjtEuxe2foR9/d9iZ+Dhu02sVfo1sdfizVw61yy39wtG j6Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844009; x=1694448809; 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=F0uZGrdkSgs5HoqGdgWfurGjAeEUVFxD0ugElwq2vSc=; b=kV0kfsbI9iiocRrJP1cYcBYDtRjPb9UDE/A/IU6HAeJD5Oh4e3hf2shmBdGx1gC2/2 D/3zBLV+8oc2AYYLK6ljxlrY8RLSM14ryUNbC64nlLYZOGcsqECsmamyT77rQ1t8ngCG NMqCrUEPRAKlw0XW6lUN3/BDWhhEMkxzF934L7HPd8U2AoV6c4HqpDa1BM1gwSEJV0qQ Iw/dvQ+28Ig7vytevyDa0V6A82fNIj4bdQzm+B6QmlvtWo1jJWCT6qPyz8Z8ljpJoqxz +MibViDsL4OkPlj7/zLhCBnpP73Q/ENnbz/EX5gwd5Mdh60O0PkRlAGcHWJmItqJE/9b Q0hg== X-Gm-Message-State: AOJu0YyOxAZz/EfAiCp8a/wmvU7ImsohZaQjVrTeyvJ5r8FhbTt7NWli g428/dSOHuQdIv2ZwMYONB6FyA== X-Received: by 2002:a05:6402:2b9a:b0:52e:585a:e94 with SMTP id fj26-20020a0564022b9a00b0052e585a0e94mr464702edb.2.1693844009181; Mon, 04 Sep 2023 09:13:29 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id p11-20020a056402074b00b005231e1780aasm5959553edy.91.2023.09.04.09.13.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:28 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Peter Maydell , Beniamino Galvani , Strahinja Jankovic Subject: [PATCH v2 09/22] hw/arm/allwinner: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:21 +0200 Message-ID: <20230904161235.84651-10-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fix: 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 Mon Sep 4 16:12:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 719993 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1687755wrh; Mon, 4 Sep 2023 09:17:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHIcXwblVGySlTkUFIvlt7bSFhuBxRkXtCv8rdbCD3xq588XvPdosELTZEAarvrgpu8X+Xg X-Received: by 2002:a05:620a:2592:b0:76c:ba61:f8b with SMTP id x18-20020a05620a259200b0076cba610f8bmr11368755qko.23.1693844235550; Mon, 04 Sep 2023 09:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844235; cv=none; d=google.com; s=arc-20160816; b=F3dJNsaWyMiqgR6NMu1xpAJmWWQ5fU0A8xTUzH0JJ9bcwwBlxiXdLoMdlJ1lc6Tvil iZcTNpmF2kwU8tKzHJ97EbWNAyt0/4FtVoRwYbAY/HnYWESzNyb3Eb5E/2ZLbTgkUn9N Oyw62c6DCcCFaWbLZ+AoHIxE6Xfmdmb8VnKEyCaGo0NaUITOdsQ9bSoISGdhI52AGRk4 IqVIb5cCv/xssThIe7wd4sJH/ZdNbWY0LULCv/URKUvuIySIWz1aBzC5AJLhLR75NUZF XhcxFwjdAvu1P7YnIrA0IE1mpI0+epn6m0g85ASdjS0NNKZk+C4x/dIHI90T+urc6jHs SzUA== 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=ChksAbLKNbEJCfQvP2AD4Ev1dT6yyMkl8ntg7rzJ2Ek=; fh=9tQSUb+DvnBd23CPtpbknJd6QpRis8yIWJGoCvKV/dQ=; b=nXJV+6qi/zQ9E1YcTuYFfSDDoaXzrJfIw+fFCS38cRRWM3NMmyxlzK0fotVONaoXbM TULgr0OC/uuituLz1O7qwyewvmU7u4W7xiL9jUYJE3V5UNYbVYCiaDA0gNhM3Jpr7stc uVKgBp11sTiELQfSYGB4rdBLKlSwPNuzNrfKAn2b8NCc/QjQ2V7bo6yRQ2Wbs/lwL9k8 JxO75NBJW2S4s+UNtWpyQab8vspL+vuj14TJPW/BJuCZoRsNC+IdybQltBg77EfG+A7Q PoFW2yg5qQTGbh4n1TGlnsIMfQ1r8aJjCXe4wBKj679Od+9pqKHplqj5LsE6aY6GGC5B QlgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s+7o8NOH; 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 bj31-20020a05620a191f00b0076db6a9ddd3si7286321qkb.454.2023.09.04.09.17.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:17:15 -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=s+7o8NOH; 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 1qdCCs-0002xx-5S; Mon, 04 Sep 2023 12:13:42 -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 1qdCCp-0002uC-1P for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:39 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCm-0007bG-NY for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:38 -0400 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-52a5c0d949eso2152127a12.0 for ; Mon, 04 Sep 2023 09:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844015; x=1694448815; 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=ChksAbLKNbEJCfQvP2AD4Ev1dT6yyMkl8ntg7rzJ2Ek=; b=s+7o8NOHFY/Qvg6keK/csogYOKCRKKZD1B+QcJut41kmffiZXk6nVoh+re/ZYugg4O dgj7l5wMh3bop2IrjJDsMTZRHFGP6UDkRKu/mfIc+YUW8O1ISf5KEHSLZtxAhegHwQcx A5djzvP1JlKzsLNcMR8Pit7Ghg15W6ukSY5EOt0UNPYH+FavaWGjDeOl3S2fNti8BIg3 4lcq3cxyzueQbo/EBpQTXjmZs9v18TlWVKIMVv6XcIY0UZajUMM20oOFs9JqWuYu8s7e pJneyATXa33Z75HKE/qqS4rVUw3xqHCqE54jGIu5ek9rNC1y+cGBZkVcXyW/QXrzETpX c/4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844015; x=1694448815; 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=ChksAbLKNbEJCfQvP2AD4Ev1dT6yyMkl8ntg7rzJ2Ek=; b=Lf/1aZ7djQ+uGQQGpSsoJ+KS7Vpa018QPu5PEw2I5cQndUJuEi14r1UR1P7KEY+gNo Y2exJSUGl91gjfB5yTELoBSqsm2caHWCV0InSoH52DsJ4iOlfcBVIovQHNX6pKjc3ANG KLW3f3odzUI79Y2f+8giNMwZnI4c8G+Xa5fDpDod5FT0J08jYwjQ6RFjbX54b14X+9tS /sLBVRQphQGz7VBK3mrgnWFPIp6sfhaTxWjQZdkOVKl2lHFa0ikbezWhbRBhHKI1DtRL WEKYUBvTHvVGcscVBQLNh2NVU6Y15qQ2NkO/H7h3I3VGTT0a3t5cJBAmhVuGN5bGRSeM s3Mw== X-Gm-Message-State: AOJu0YxqJczPibl07oGw/IFLRUhLbO8waKJACOGNikIyLAlaCqCW5gAq 71nPEVR4raTI7HiB7gmYGNrzzQ== X-Received: by 2002:a17:906:8a76:b0:9a1:9284:11b with SMTP id hy22-20020a1709068a7600b009a19284011bmr7550965ejc.7.1693844014959; Mon, 04 Sep 2023 09:13:34 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id ox29-20020a170907101d00b00992ea405a79sm6360088ejb.166.2023.09.04.09.13.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:34 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , Andrew Jeffery , Joel Stanley Subject: [PATCH v2 10/22] hw/arm/aspeed: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:22 +0200 Message-ID: <20230904161235.84651-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=philmd@linaro.org; helo=mail-ed1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=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/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 Mon Sep 4 16:12:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 719996 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1687916wrh; Mon, 4 Sep 2023 09:17:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFoA6FCzLy9Y+1aP9vUK5cSzjbmFuI+M4DnuVw+PCmgwNf+JHsKU8+79LnfiMuR453Iwn7R X-Received: by 2002:a05:6808:b18:b0:3a7:4cf6:f0cb with SMTP id s24-20020a0568080b1800b003a74cf6f0cbmr10049815oij.21.1693844254181; Mon, 04 Sep 2023 09:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844254; cv=none; d=google.com; s=arc-20160816; b=naEpW7b7STms7bJ2ovnwplkLnICC/hVrGgotL+yDtZFhpgrxo9nWYJYe/XhDkl2DGG 3eNSm9gVgR6vJm+BxlhEDNLv80G6HEkKqPDNQvKtooaGxr1o7eXXHSCo1VmIo4gxUMbx VvhLMRO2SWHr0nc+94PP2m8DF0h3lWFque8IXCVFQSRjVTxBxZz3uBvGNJ8JPpMjGPu1 4eLSX7ZGwspdlgZSyOPAJYWbhO3vRgs+Ahy75XWes7BcMhhjATy6ehfxvZv0l59+9to3 Sea64NvdU00jo/7f86gLZRQsMXh9tjTMqJAx7D2oIHyScxhV/g/X1o75AjjUyyi25186 ctZg== 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=AtxmCag4qEbqn9xG4sHIYGW2U/bX6/m/Of4KaQ2VYN0=; b=v9qeHhxLRsbkPkXZGnJ9XW9FFajFHACSonJZnsNg14RvUVEW+6dSg0aTy2ZhoBaM/Z SZR1sCwGcKCtK6IslCRuBVgnpErxYfepIbxLgEb2RGbVpliiqGNH58RqGa7zRbNGbjkT VDRjs2m8+zg9/aqhtSFSMYhAbgfYIqodiLrS8HtpeY90LxA2N4XW6u+xnOQ0XvOtzbR1 hPzUzaQ8LQazeJDs5LymGGNv2UMg22rCt2oS1iOVBkwOmIuRp4ifTf16w9gSI83hGuye fpVXJ+ZgPRhbFZsN6WxM/qjmK42VqspgxG8y0qV3f7aOMQEKazK0SRPQqs3fa25bFfny u6eA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UbgwP/1s"; 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 bp43-20020a05620a45ab00b0076ccb18cad2si7010782qkb.646.2023.09.04.09.17.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:17:34 -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="UbgwP/1s"; 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 1qdCDD-0003TD-F5; Mon, 04 Sep 2023 12:14:04 -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 1qdCCx-00038V-RM for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:49 -0400 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCt-0007cH-Nw for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:47 -0400 Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-500d13a8fafso2879212e87.1 for ; Mon, 04 Sep 2023 09:13:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844020; x=1694448820; 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=UbgwP/1sUC1Jy1pfP9nRxaVE8csU+f6ng6UvVedVPktD4YzquZhwCL5BEAPG/NnkTe tymlOnhlkgGmou+4o0W/vX3UMInYVvws3M6SMZzGJGwRkbBPQojz1zJTTh1jVnYc8/ii X9kTiNseanj99ImRbwtr/wFrTb7/RZbAzm9bHdw7wMaYsdPVEbWII281o/JWrfiKr//1 Kz7RgWqCOED9Fy1MIocqxHQHaic9Z1AKv0aVZdRF5HUso3DMQtQIoh6QWxX4e1QgeB60 iYK4qJc7CZWXOIxYEZsPoqOQidimvSG/yrEOq2IJXkW22Sou6vullEJqLt8lEgccJWqP Nhvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844020; x=1694448820; 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=kH2wply3Ku39Dz739OX2hKURzQDqpVKv39NJxgyKUBmZ2lMPRFzuTnLDVpH/Dgj8B/ eogrg+wC6sVUawmR+L9VmYYzCzXzmYGWVIP92pHzLrMHv5yBFeGAzDk6rz9h2OJ5bLdJ NF2QmHq5BF3sjC7rJIf6ExgwEMAXo4dYVx4hEl+TKEgzsfC9jY0euQ5f50ojH/OqWwgA xfc02kCA7Pq8A1j/wjyioOz59j1puW/YZqtM6e9ZrYOsiBPnqnb/32DZVrbFgFj9ILe+ /ZHoeYbzOdvPW3vBzpKRQI/sQi8eCNaTIO4JIVcnF32n1xYZcKakka20rwu3DxkygPWj l9hA== X-Gm-Message-State: AOJu0Yy25rJHZtRyBd/AGIJPl7OWfRyimd58NG4voHUQ4BL6tKtATf35 Sm8rnT5s+V8kZrRjIMAzqAtU1w== X-Received: by 2002:a19:6914:0:b0:500:b2be:61e1 with SMTP id e20-20020a196914000000b00500b2be61e1mr6672295lfc.58.1693844020699; Mon, 04 Sep 2023 09:13:40 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id e19-20020a1709067e1300b009a198078c53sm6306103ejr.214.2023.09.04.09.13.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , John Snow Subject: [PATCH v2 11/22] hw/ide/ahci: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:23 +0200 Message-ID: <20230904161235.84651-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12a; envelope-from=philmd@linaro.org; helo=mail-lf1-x12a.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 Mon Sep 4 16:12:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 719997 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1688009wrh; Mon, 4 Sep 2023 09:17:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHSLhzPWQI8dyGBJh2GCD1miLz+6IQsQ1+FU/kSWwT+d67TwSBRvXtULMljjqjNl1ufB1wF X-Received: by 2002:a0c:f189:0:b0:64f:4ba6:3b2d with SMTP id m9-20020a0cf189000000b0064f4ba63b2dmr11229280qvl.44.1693844264140; Mon, 04 Sep 2023 09:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844264; cv=none; d=google.com; s=arc-20160816; b=U5XdWvM5Z/AU2GalgsmbIjg4v04tZbjVu3z/Zi3W9/Si4TauonxW+LpnsxaIezjZS0 t/7UTqK04oaEzbW2Rd9DYgODbX4qGY7bXTZbBxG2bP/R1USO3saNmnuaFCQhDx/OOBTT VVMn7kve8cKkb6rYbmguxU1BDQpoCC57gn1nHXSW9z4nCdj2PATFH2NnNtJYvKLUHWpE 99kob8YNtTSoEIrNBZNPtMrvR+TtmSzVfRKzOjG15y9+DEdTVgLu8CRrJxLoN3KLRtsV MZNq21W4eFROUKBXFQwL2KPXWCz+UgMyTIviNkQILHy4uYdHZnZaVlNwO/jQ8v30YWsd AItw== 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=M4+wifAeNQ6fagA7lq67eYgVVAfcj+heqTkZZhMPaG0=; b=rs1qlghPv5T0TMPsGIS5SVvy0DTScTKw35dPDNn5w36vrWvNLX7F6ls0aPkf5GNCmE ZMu+uy0EpmhSUXyPz0BL3ZBffE1u/E0NCVwNdkm5vnoMkrlU0t7IucWDBikgthd7NKzG T4qGc4XVecPup1N8yoi7LJ3BmB0bAO+AOlL1wQvnRYUtQ/5hdu4XaemlmCyw/pzxomEV 0Z/uUTTCHeAmDMfrSHXgg+9KghKVfX1InoRv8WW5yjFNZOOcOiEM8eHNgoZe42ZQZ+Nb HvKxlyY9RidnyUkWevhVtcduPtPN6Uw7fb8R3hhPCq2F73YUkUbtnkneRO8HKQxWPm97 aH9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="c/973/uT"; 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 j17-20020a0cf511000000b0064cd41b2cf3si6682573qvm.25.2023.09.04.09.17.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:17: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="c/973/uT"; 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 1qdCDH-0003oF-78; Mon, 04 Sep 2023 12:14:07 -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 1qdCD3-0003O6-My for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:57 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCCz-0007dJ-Fx for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:53 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-52713d2c606so2185766a12.2 for ; Mon, 04 Sep 2023 09:13:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844026; x=1694448826; 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=c/973/uTe+N/IQykusnsMFRVUVB2N7JThDoD1ZZmid2KoFWyS206xgELMhWyjUvzhn Nj+656nMRl2zkTuSE9/MBHrlQn6kGelrB4clh1Sj8r1ZeaCCKqTEGt4JxeiZxAImz8zR w9tJNqlj7zvwEVPzW6SK/HR05/TJImooitZZiyeilD+0YMsqZJsMoljA8fGZW23exoVk /RWH+8ZNPQQmL9JAIBSWFWRvRWXt9czo6jVNryq6C+ddIYjXsY0c28t1Qe5eegAUn9B3 Th+J3uBcEZgGsbGGb1AjKTNMWhOlBuf6NbSUWxm9ooPaIBdtKE8+Erv/uNyKewQ+kuV4 +sSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844026; x=1694448826; 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=fCu8ZyvPTzZCvWrVnv4ikKhtolt3NHrzjYWMQYPsNz0iqnn5oF1QS1wTHbI/8Ur9/2 GZ5nsqRldgojtjCt8KD3Zoo2Klvn6mtcNWQ6Y8YAGk7sSjr746N52RxM/3FuU4KbD6D5 sFiYLR5SY5Km2YesOtT3mN1ykURd+FJx7BaS+Q5pqSyt+zhAF7hd3Rmas7AT/cHIcJOA +a9EGRSS7CLKUdRmeM2MqS8UmIEbR9qLaxtS9CF5VHrcYIP9VzqTfC47bgal8RqgfKae mmUYenyoad2Yggu8wPPi2Voe12PRIgS8+Y0ZmBjeN7MfuwjC/sSITkYeb9Ay7oPMKqLF MZ5Q== X-Gm-Message-State: AOJu0Yxd9LyRY5Py2ycO4R+DbZG9fUgWtUghrmc7ZZBoIcgtZfwIyM7P DfLIrpkA+l7p9jo+s7QhWwHDRA== X-Received: by 2002:aa7:d6cb:0:b0:523:d8bf:3298 with SMTP id x11-20020aa7d6cb000000b00523d8bf3298mr6739551edr.17.1693844026378; Mon, 04 Sep 2023 09:13:46 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id b22-20020aa7d496000000b0051dd19d6d6esm6048130edr.73.2023.09.04.09.13.45 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:45 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Laurent Vivier Subject: [PATCH v2 12/22] hw/m68k: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:24 +0200 Message-ID: <20230904161235.84651-13-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.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é Reviewed-by: Thomas Huth --- 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 Mon Sep 4 16:12:25 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: 719999 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1688102wrh; Mon, 4 Sep 2023 09:17:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHTbbYwmb2QNOrpXlpnRErJSeGIo/+iJLpw/7kYEM4AT+uwQGbOmeGa7rLD6MPBnnLS1+Zv X-Received: by 2002:a0c:aad4:0:b0:655:87a1:49c4 with SMTP id g20-20020a0caad4000000b0065587a149c4mr934764qvb.39.1693844277220; Mon, 04 Sep 2023 09:17:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844277; cv=none; d=google.com; s=arc-20160816; b=BjtbasguWFH0MgifpNdn0urjuSJ8ulJ3MC+jzppKgm2waSJXNVqA0hf9PKEu9gNEjf VmQyP1ZOyEqlhte06jam6v9iYCNKN433mabp+v9l4AOkJY/d1cAXrKHWaQ6J+M8PIn6p pvXRswa/csq+01dd4uaX0F7lYED8/WdEE2gUyVpOjrLdcX3EtsxTq7g6PIEx5RvjEdtx az5qijVQXe37NQs9jaEMJHiJ5hE0FeObDRN3FnpQnNnrfSlriLXrSpE484YvqXD2CkE2 2t9qlPoRfqAmZxSpy7c+774Ki4z64rdP5wDGnP29JfTWVSCkQ6MXs19uzHbhuxhjx+Bt 6Wyw== 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=fhyPLNQFlPI2Qtv/db+V50enbSRfShGobOGuQ5IYsJA=; fh=HvdrSrphu1ODNkbTjx5P6GZ6fTRKOIOyTadJ3yf+IkA=; b=x+OOr+K6Z9yfHozKp33PCQZm0XykZ5bldrUhN3mMKZLwJjNjt8ENuQmIcpUF/7Yzuj AS4EU7vZWbN9UZtEbSOQMuABtXHzhIA3+SgAaZbNkQO7hynBt2/1EAjT4wS5z8a3u8at Xkxz+5p6su7MLcYWh1SCNFET1RWcylHfYs+3BCFTaUnPbpEoOrbM2C1+r5cQ5vWkb3hq RKwGhNqSY7jjdwXfJPsY9Qh1YJOGWu9pMmzPrPfee5Gv3OCqYc3VHAwbDhH1BECRnZNv 9kl/fSJlfHIiJ9Ud1wPQsJTaxAWiYd6rrso9EkgUPcNeB9AMDZxM42H+kivAv4+Bfmln jeDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nVskmaef; 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 y5-20020a0cf145000000b0064ca647d174si6726353qvl.88.2023.09.04.09.17.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:17:57 -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=nVskmaef; 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 1qdCDL-0004E8-Gy; Mon, 04 Sep 2023 12:14:11 -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 1qdCD8-0003QY-6I for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:59 -0400 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCD3-0007eN-EA for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:13:57 -0400 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2bcb89b4767so24278021fa.3 for ; Mon, 04 Sep 2023 09:13:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844031; x=1694448831; 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=fhyPLNQFlPI2Qtv/db+V50enbSRfShGobOGuQ5IYsJA=; b=nVskmaef1b2JOZgy+xR/QQJh0wkByhD7E4tPhNfHMFqevZlZ3dHa+8eZ0LV3PVqEaX NhGS0st3wk4Fj42IX4pIIzBYwZJgM6hCus2fEy5TO7UC+UkQv+t3NLxA6TDcpGgWHtZr IT48+2kBUn4FxQCDTWdQxFUDkfu+u9S5QJAM+GxVoIJnh02egOKkEBhbzGtsnvMTs5fK hIxMs5mkSFM8u770IyIldClz5+UmAJZi94soayyTcHFq4gFsmCLCXJwJsNk5LnmpE7x4 xkGzbvQIHOprvtB7LiMcUG3fQGIGCpaOSS1kfGKBKIvLxogAhNt9J3lIvYAiaPPgD9pl yoOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844031; x=1694448831; 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=fhyPLNQFlPI2Qtv/db+V50enbSRfShGobOGuQ5IYsJA=; b=SX8nuiHHWH9nSblxyyJWLUCd+YguGJFxhJws+xB9hT9R0Osla0DFvP5vXzDWYiU50F rRFuxZa0Ru+RK6ebugFr+9rrWwY8ItfnX0BXhxWyjv6RjE81ghXlX8rgQ7wjnLRdcT3n FfwZdJlMt5JFMBjDVH0t0R7Cqu80YV4d/Xn2WJ/BWPP8tV1lUISX27bH2Qrafg9HoOPw oJWvvZ5CF78AzYsHXgXCM5oS1YifNC7mpgtr2umvmigxQW9LBMUgYR4VrqaTkzH5cl7s JXtH1SEeRxrTEaeoOPo9sWv9HzuQepxCSi5GKx/WVkvmVnCJjBZNHD6pn53HkYh2sCCq 3Zkg== X-Gm-Message-State: AOJu0YxXRrbMuHStc2QNZEnu9mDAUf4IlowHA+cgeZYIXNTVEsSwi1/E zSzOpr49r/hO19K3pO7lZ0AqeQ== X-Received: by 2002:a2e:864a:0:b0:2bc:c846:aa17 with SMTP id i10-20020a2e864a000000b002bcc846aa17mr7888614ljj.41.1693844031798; Mon, 04 Sep 2023 09:13:51 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id r10-20020a170906c28a00b0099297782aa9sm6318128ejz.49.2023.09.04.09.13.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , "Edgar E. Iglesias" Subject: [PATCH v2 13/22] hw/microblaze: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:25 +0200 Message-ID: <20230904161235.84651-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::236; envelope-from=philmd@linaro.org; helo=mail-lj1-x236.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/microblaze/petalogix_ml605_mmu.c: In function ‘petalogix_ml605_init’: hw/microblaze/petalogix_ml605_mmu.c:186:24: warning: declaration of ‘dinfo’ shadows a previous local [-Wshadow=compatible-local] 186 | DriveInfo *dinfo = drive_get(IF_MTD, 0, i); | ^~~~~ hw/microblaze/petalogix_ml605_mmu.c:78:16: note: shadowed declaration is here 78 | DriveInfo *dinfo; | ^~~~~ Signed-off-by: Philippe Mathieu-Daudé --- hw/microblaze/petalogix_ml605_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c index babb053035..445509f699 100644 --- a/hw/microblaze/petalogix_ml605_mmu.c +++ b/hw/microblaze/petalogix_ml605_mmu.c @@ -183,7 +183,7 @@ petalogix_ml605_init(MachineState *machine) spi = (SSIBus *)qdev_get_child_bus(dev, "spi"); for (i = 0; i < NUM_SPI_FLASHES; i++) { - DriveInfo *dinfo = drive_get(IF_MTD, 0, i); + dinfo = drive_get(IF_MTD, 0, i); qemu_irq cs_line; dev = qdev_new("n25q128"); From patchwork Mon Sep 4 16:12:26 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: 720000 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1688305wrh; Mon, 4 Sep 2023 09:18:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFqXYY+sOrBc46JEPc3ySAxzTyN59gtwwGryGsjbBsfLf7LOlCuGXx5N9Z2nY8Vc3ZBNPrD X-Received: by 2002:a05:6808:3092:b0:39c:59e2:dd79 with SMTP id bl18-20020a056808309200b0039c59e2dd79mr14519388oib.36.1693844285113; Mon, 04 Sep 2023 09:18:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844285; cv=none; d=google.com; s=arc-20160816; b=wVnp6Lk6GwkPlUnRUJ1wExwWWzNlRP0oVS1Y/R0dmqeh0/o7ItOgyaPXYZqDdfRgRC iIKKTxs2sitUl3hQXCokxY8+PUA+4WSyNIZSlogdmxqyiI0seA5n9y1Ol8I7XXfX5ync 8cKJ6Ox3CoMxLQ8uMJN9U8kbCTDTpdAlNsG4118vMHmWGb5pPhMQOlTt37rs6POV6Dvx RpFbScgkg8KmYGn1KAlmZKxC49FeGgC8lhUQuXU2wOWtOz2CSMLZ3CUfejGjH1Nqchz1 62k8Py+76P+5Gus9KxP1fk9vh0RBi52UPNBXJLu1UHNF+0RBwkG1+87e1zVij6h7PoiF 3RrA== 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=1py6WJ7lyP7JjfX18bziMc96oyFqE8D3chzbCT/Lnv8=; fh=/VsiGXSITn7Xm1R7BExfmeuAsw3bqogA9P0rdoE9plc=; b=at+tHN8rJ5AV05MV6F7MGop3pfTxpk0QvNKQDyGXs5E+JySY/TxohjC2fSM6KUtpyN aEBsr1S6oGo4LAjiG9TWFr0EXMr/CTjCCdcR52JJp8ZxnvlSJoQbnw/Jf3j5Xxm9KBZQ Mgbj2vxFpL0eCyYpFhKO2gAEOvsRCxtfKxfqcBxqBB47QJxaaze5av45kOw3EYdWEFyj LFzd5wjweaeADrdHCvUFFDC/f8D0JnkAmZmp358h7obHFGvj6wIM302LVs27oW4+t6ab CbVbXPyaFctxXkbDehfQ+0mg8XqKoEVKV4kZceNhZpbG8aP6cl+nIhakqx0mPKTSn3S3 Q7Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MNd3w8XO; 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 21-20020ac84e95000000b0040ff1f5a4dasi6553663qtp.412.2023.09.04.09.18.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:18:05 -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=MNd3w8XO; 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 1qdCDL-0004Bu-B3; Mon, 04 Sep 2023 12:14:11 -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 1qdCDC-0003bT-8o for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:03 -0400 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCD9-0007fn-WE for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:01 -0400 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-52c9be5e6f0so2037864a12.1 for ; Mon, 04 Sep 2023 09:13:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844037; x=1694448837; 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=1py6WJ7lyP7JjfX18bziMc96oyFqE8D3chzbCT/Lnv8=; b=MNd3w8XOTB9J+rzeWLWgsDrMqDCWYGGHhv5W9sS13eAhto5q8PYFGcP7boDYDASpUF Q3YLHb1B3TJAX5Bt0XaPrjvmlYh45s3cmHxpJbKWXomblQz9QfJ6KRVscy0yZgt+G2LJ WdG8HIOZc1Mu8icYy335Temn2aUFP8LnOqBKTQzYyq3YJwcMHTuWQw1yZ45BC+w1cX1g PWXaViyIrcx1xr2FkdwNjp3N0iP+/uuk4OM9eY2Vt5T/K+rDerjCn/LPOArVDryG2DG2 P/i2012cSyQR2HSToDcXRfQR600ud6prMgyVJsosAltiG7tCx/uKlXOcLjeRnj2AnlV+ hdSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844037; x=1694448837; 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=1py6WJ7lyP7JjfX18bziMc96oyFqE8D3chzbCT/Lnv8=; b=LLOS/YJGeovqFRYCozacULZW6ev9xHCLUeKzAPo+Xud9xELvk0w96JUyyZP+Mb7MYJ m5ZheJa3j167Da0V0AkbwhWX/PBfgkyZPdPCb/mTY9t7Dr3O1DQ6i2iy2sCx/zh78BMf b8IARjTpd/xiKgZrfarlf6Xctai7z2O/EjAh8qkU97R2zGxdsSHpO2WGlCD0VqB67cls nFHGzr+U1mtY84V5r6ExXw/EfWZ8sqwV/fdDZCtavkVjFzQnQ0cYYzEbtstLfPJ0LWTA o9E90PiXGqMPhi2uVSxTah+IDzZyzyMkFb6giJ4InT0mglSnTM3kqZvCPwZ4AF4AbxPw 7XVw== X-Gm-Message-State: AOJu0YztW7lMyFVFvxgQvUMC4Mf5UvY3Aa2xyhzfQXvdzIYLQWD43lux rJtvSGGdq28Fc6XQdSn+ilvb78CIRMB8CfjxHMg= X-Received: by 2002:a17:906:70d6:b0:9a1:6318:4d39 with SMTP id g22-20020a17090670d600b009a163184d39mr7494768ejk.29.1693844037451; Mon, 04 Sep 2023 09:13:57 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id xo9-20020a170907bb8900b0099cbe71f3b5sm6306309ejc.0.2023.09.04.09.13.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:13:57 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Chris Wulff , Marek Vasut Subject: [PATCH v2 14/22] hw/nios2: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:26 +0200 Message-ID: <20230904161235.84651-15-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::529; envelope-from=philmd@linaro.org; helo=mail-ed1-x529.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/nios2/10m50_devboard.c: In function ‘nios2_10m50_ghrd_init’: hw/nios2/10m50_devboard.c:101:22: warning: declaration of ‘dev’ shadows a previous local [-Wshadow=compatible-local] 101 | DeviceState *dev = qdev_new(TYPE_NIOS2_VIC); | ^~~ hw/nios2/10m50_devboard.c:60:18: note: shadowed declaration is here 60 | DeviceState *dev; | ^~~ hw/nios2/10m50_devboard.c:110:18: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 110 | for (int i = 0; i < 32; i++) { | ^ hw/nios2/10m50_devboard.c:67:9: note: shadowed declaration is here 67 | int i; | ^ Signed-off-by: Philippe Mathieu-Daudé --- hw/nios2/10m50_devboard.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/nios2/10m50_devboard.c b/hw/nios2/10m50_devboard.c index 91383fb097..952a0dc33e 100644 --- a/hw/nios2/10m50_devboard.c +++ b/hw/nios2/10m50_devboard.c @@ -98,7 +98,7 @@ static void nios2_10m50_ghrd_init(MachineState *machine) qdev_realize_and_unref(DEVICE(cpu), NULL, &error_fatal); if (nms->vic) { - DeviceState *dev = qdev_new(TYPE_NIOS2_VIC); + dev = qdev_new(TYPE_NIOS2_VIC); MemoryRegion *dev_mr; qemu_irq cpu_irq; @@ -107,7 +107,7 @@ static void nios2_10m50_ghrd_init(MachineState *machine) cpu_irq = qdev_get_gpio_in_named(DEVICE(cpu), "EIC", 0); sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, cpu_irq); - for (int i = 0; i < 32; i++) { + for (i = 0; i < 32; i++) { irq[i] = qdev_get_gpio_in(dev, i); } From patchwork Mon Sep 4 16:12:27 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: 720002 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1688711wrh; Mon, 4 Sep 2023 09:18:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGrlw5l30uXOX7mw6QUXqK498e41q3uUZH9G7zfhBmNIlycQuiMINrl2OGbX0S8da1DAGb2 X-Received: by 2002:a05:620a:2955:b0:76c:d2be:b7d with SMTP id n21-20020a05620a295500b0076cd2be0b7dmr11958827qkp.14.1693844305284; Mon, 04 Sep 2023 09:18:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844305; cv=none; d=google.com; s=arc-20160816; b=PmbZoVZleb7xCk9fNwKrXNyEyO/JwpfETG/m2XDHw3eLPEpx+6qqrFz+wWqKp76VEn fag7xZscyY5vMTmiZWbo09jl/WS3nrjHqQYP0xpzu4OVpFQHHEimp/Bjt7CN9V6SUS/x pJdm5bVAmerFKnVqNo1wagcwD30xnDr7FK9mxwJP257f3vZmk5kCkEY9HrlKdJ2U2+8r i13NzyYn+jT4sV8pASn9FXS6w/1tTHrweU8JzAICJUwKEB/Ow5FEpQ4ACue/DnhRObwM SeRwWj3uaEytevswCpZytzjnJTdpQHVELJSemHPvJQ1W8atOLh9zynx+ipNR3oXUVaYi BGxQ== 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=xGuryJTSyoRXnerBPgJM/pgbtWE/XseVwBkj0AvKIlk=; fh=yoeeTdiuJ4hfP62eFKx5QaPV8IKsa/Dl76YS7AWPRu0=; b=WpaLrtkpYLabfjU3ykg11uBfI7BivlmBHNvPTdOnOaY/I+fBWH+SXgskX9tGyZqEbI N9WY039sGZFTQUoYC3M/iXTU3lLutIp/WwEKfcC2FrBUMs9eS70xy+wZ0GWoyInFmo8j lQyb43+bW3Pd+0QVGwYf0j5eaamFN+GF9LMMx4UpV4IYMXJTM0Ijvp4TLB3FBcFeaEt0 VaqqrhnM5UYUA0kR32Suk4hDfEYgzMBA9DhMjl89rAdMrxSBJhcXdCmrqfibHVWpn9OC uw8hiC3+H0gZ2FN69NCCNayUe/+54LSO6Qfh7ejb+lVzJw9yFieCuI/KeXqYqvr+ujPX ti9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OCkTZhp+; 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 p19-20020a05620a22f300b0076f03e58b62si6204580qki.147.2023.09.04.09.18.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:18:25 -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=OCkTZhp+; 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 1qdCDL-000498-44; Mon, 04 Sep 2023 12:14:11 -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 1qdCDI-0003tF-B9 for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:08 -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 1qdCDE-0007gz-Fp for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:07 -0400 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-98377c5d53eso235630666b.0 for ; Mon, 04 Sep 2023 09:14:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844043; x=1694448843; 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=xGuryJTSyoRXnerBPgJM/pgbtWE/XseVwBkj0AvKIlk=; b=OCkTZhp+xySDAelll8iDajpzKieCmyBn+f+MwFFAxDyuvalX+IeUHRS80a+dwKlzd8 J81sJnjEWByMdvS6ZWW05ZP2hmcxcgHB8T6YG9SfRDWMfUFSQ/VOAjKrkoDHlhHgZbaE /ccJ8wugRbePMIySRQm4vUaYmZb+mJJvYPBpkYUayIMSeWYALVWVaTK0oh1+biqZUmGn pKs66ALKLkyeGkYBfiT8ao7jxIWV9rq5TNnEuwrQ2kLsLEEgVP1uEnRX2jzL5bMctJpz MN8CoV0VyOAq6GnNsXoKBfOt82VzIWl/EJaAKWfMCCEEqNizLdSrc/KgWJo0YU88SSlk UV7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844043; x=1694448843; 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=xGuryJTSyoRXnerBPgJM/pgbtWE/XseVwBkj0AvKIlk=; b=SHI/BxP7nmBahYjoC4S57eAXD8yoyTlpwqJyjtphhaoZD6zYEQwF62R79WlLbhzhhq MqkI/JUc4CPpA+aZpbMZCjQeJkq0S2zyYx+Jq9kKCNAKNa1kB1HIVGdldLWANYLN960e zETs85pMlgF9WN8nIdEAVa5LimfUo/bIivrx5tHgtpksRR16Iv4UV8D4mkkbbghnWGij pbJS39KlOuiEKLVxPXhACuPraYVNOd1UIRvMomOXHSOctto2HMMG/B9MDqUMVcLLd2Ub Zoav05fmB+xRM5t4CIm6iUu7AnfTWSnTBpZkFH4yBV22nvD/BsbLdnLGY2MNtnH561IM 3N/g== X-Gm-Message-State: AOJu0YyDPY8w5iC2nfxfWdvg4mp3WX40RgwZj3EbpenARLlDFYZmgjgR JVfjrPgn1d7eq04ZQMa7xAAPKw== X-Received: by 2002:a17:906:8a41:b0:9a5:d657:47e5 with SMTP id gx1-20020a1709068a4100b009a5d65747e5mr7429251ejc.49.1693844043140; Mon, 04 Sep 2023 09:14:03 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id f15-20020a1709067f8f00b009934855d8f1sm6371229ejr.34.2023.09.04.09.14.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:14:02 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Akihiko Odaki , Dmitry Fleytman , Jason Wang Subject: [PATCH v2 15/22] net/eth: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:27 +0200 Message-ID: <20230904161235.84651-16-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-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); ^ Suggested-by: Akihiko Odaki Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake Reviewed-by: Akihiko Odaki --- net/eth.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/eth.c b/net/eth.c index 649e66bb1f..3f680cc033 100644 --- a/net/eth.c +++ b/net/eth.c @@ -432,8 +432,6 @@ _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); - if (input_size < opt_offset + sizeof(opthdr)) { return false; } From patchwork Mon Sep 4 16:12:28 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: 720001 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1688694wrh; Mon, 4 Sep 2023 09:18:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG6/+K23FA55jPzQp4+jMPgwV/q83+u58sn0lifD2b8tVIwwsK/yVyhYxaFdf9xIgyG+Gt6 X-Received: by 2002:a05:622a:55:b0:410:804b:f493 with SMTP id y21-20020a05622a005500b00410804bf493mr12702374qtw.55.1693844303747; Mon, 04 Sep 2023 09:18:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844303; cv=none; d=google.com; s=arc-20160816; b=MLOXRHBTJP6VQGhaA37iSIhI1RtT6OZQkRFmCUKbYg3za5gp583lkRm889n9FMJnie EcryDoTMpfhUgspu3cUrlzsL0X2wDzsMAl41G8lSHndD7sc0NJ0eubwh8eUR+i+TjrTZ fIU+kEVv1pBxJ7sivwaJ+cLUKd58r677rgDkQfknIFfJ8583SUcMNqAyxhS6l/pIe9vB uK1DYS6p/yYiWocP2MhV0aJUB6IBLyKHS0PRFvH+GOM+rO6qayVsgdKCcrx4qU94Wckh vGvygDiM1UQJSqGEDJF/QQ3gM96Ovd9ckIRkCS3m9mdHCn+05JBk5jqV8Zx6x1EDRhW8 6AmA== 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=Xxe/gfQOqcpGIg7mgqqlKfLWKMuZRnXp4Q7SG5q4uJI=; fh=9YiTiOGNmleaUv1UpLaCouZ6Bol5UK2wIzrKmb3D32A=; b=KQbJYDs1NleiVwCwUJZ84woKXmlrhj4yF1m2nElsYJFTlaeB4azwUVVaDw1kXFaPcw knc9ZdyKeH9Kza4/SNiPixw3P0RCLJhCPzP+jMcjlIfm9dBqOCBuBjr6VVd7YA/JGIoM Xq2yceRqWaKKdhWUwjCUW8xSsjKqDMgksSTzjYzuL26zEPykZsdLnQO/YrM85Azx3ZVr T2AHrONDk/ESOfmqhrM5ALaSBGmYD4a3PeX2VlELC3/os0Y4mPLBrviq+CVi43wv3G2/ EZKs/e2Uz0wy8OWuM4YWcAuQM8HokhlZyv4V0bjyD8YaxGITJwVgyw098db+s88UqS4O G3UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E4V1MaLh; 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 c7-20020ac85a87000000b00403ea9d6917si6867092qtc.648.2023.09.04.09.18.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:18:23 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E4V1MaLh; 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 1qdCDN-0004TI-He; Mon, 04 Sep 2023 12:14:13 -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 1qdCDM-0004OI-JZ for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:12 -0400 Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCDK-0007i8-5d for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:12 -0400 Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-99c93638322so347288566b.1 for ; Mon, 04 Sep 2023 09:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844048; x=1694448848; 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=Xxe/gfQOqcpGIg7mgqqlKfLWKMuZRnXp4Q7SG5q4uJI=; b=E4V1MaLhlicau1XVWJQjozb5oq1xn1JP8IVn78t3Ao+2LIhvNObyz3WO2FoDYCo9Vy QtOtjq2zqfJO524R1quleO1QKWAzSfS07Ui9qRbBqWHsCwRLrysiHYUgXcCeRR7ep42Y uLkhBBzjewaiH6IOGs0jzXoTNJURmlfBGeS/v6qzQllJi0Fh6WrK1H3znI3krCEuYc6W fLgrZKELwa1NPAy4d0AzCZ2uOo0k+pNkkHwy4B4HBOxx6h5pmfSyC2EfgYnbEzs32eqs mO3A74JziLRi+paZ9bDBTg0kBQMRNrNxi5SfnzEyDQjq3r/9td5Xa8U/uei7C6knYe+m KSww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844048; x=1694448848; 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=Xxe/gfQOqcpGIg7mgqqlKfLWKMuZRnXp4Q7SG5q4uJI=; b=KURR0I459i71dQD98+02rRMbHiVH3PVKyC+9usqcLuUrb8BKmo+L+CwKOJ+UrIwqQq mw0ZCv5Cy+Gu8TDk1TUxhOfUp4+sNqUvBtWIiG4uEy4QZFR23l3cpLTs+UreiMz/Y7dF h3+HQ1mr4OI6KHX04bGIJyYEc4euxDMP8l/wCnEflpWPjpaLOpsaawGzgkmhPwcy5HOt Eba7VNMJWwe/9pjqGdWOrnZ6qTOKfG8PQA51NOiUDclanAXTj/q4tf8vwmQcJw4WsiCa dW04ZZbiKjBwaGv9f325nwoM6tmz9Iq+tkqKAyDDWLAhv/VovMG/A8Kk3IinN3LjfZl+ aVmQ== X-Gm-Message-State: AOJu0YynvLKZjubdGK7xI4QLsKd7aOKB6ptMgY/jLLpG+KhyEaWjsQQO 5ULkP3W636SsAGNgnU5vKuGuj6TZ3kuJhIrhSG4= X-Received: by 2002:a17:907:7202:b0:9a2:25da:d71e with SMTP id dr2-20020a170907720200b009a225dad71emr14241419ejc.0.1693844048790; Mon, 04 Sep 2023 09:14:08 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id u23-20020a170906951700b0099d0a8ccb5fsm6384460ejx.152.2023.09.04.09.14.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:14:08 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= Subject: [PATCH v2 16/22] crypto/cipher-gnutls.c: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:28 +0200 Message-ID: <20230904161235.84651-17-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62e; envelope-from=philmd@linaro.org; helo=mail-ej1-x62e.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: In file included from crypto/cipher.c:140: crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_encrypt’: crypto/cipher-gnutls.c.inc:116:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local] 116 | int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); | ^~~ crypto/cipher-gnutls.c.inc:94:9: note: shadowed declaration is here 94 | int err; | ^~~ --- crypto/cipher-gnutls.c.inc: In function ‘qcrypto_gnutls_cipher_decrypt’: crypto/cipher-gnutls.c.inc:177:17: warning: declaration of ‘err’ shadows a previous local [-Wshadow=compatible-local] 177 | int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); | ^~~ crypto/cipher-gnutls.c.inc:154:9: note: shadowed declaration is here 154 | int err; | ^~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Acked-by: Daniel P. Berrangé --- crypto/cipher-gnutls.c.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crypto/cipher-gnutls.c.inc b/crypto/cipher-gnutls.c.inc index 501e4e07a5..d3e231c13c 100644 --- a/crypto/cipher-gnutls.c.inc +++ b/crypto/cipher-gnutls.c.inc @@ -113,7 +113,7 @@ qcrypto_gnutls_cipher_encrypt(QCryptoCipher *cipher, while (len) { gnutls_cipher_hd_t handle; gnutls_datum_t gkey = { (unsigned char *)ctx->key, ctx->nkey }; - int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); + err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); if (err != 0) { error_setg(errp, "Cannot initialize cipher: %s", gnutls_strerror(err)); @@ -174,7 +174,7 @@ qcrypto_gnutls_cipher_decrypt(QCryptoCipher *cipher, while (len) { gnutls_cipher_hd_t handle; gnutls_datum_t gkey = { (unsigned char *)ctx->key, ctx->nkey }; - int err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); + err = gnutls_cipher_init(&handle, ctx->galg, &gkey, NULL); if (err != 0) { error_setg(errp, "Cannot initialize cipher: %s", gnutls_strerror(err)); From patchwork Mon Sep 4 16:12:29 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: 719986 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1685976wrh; Mon, 4 Sep 2023 09:14:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWPj+HHqNqE6xcHKWlTlsyQRiM7Eme+cDw+zo7/eFS4QVNCQ5XVXpeLZ4dRPgovmrvtrVX X-Received: by 2002:a05:6808:1687:b0:3a9:ba39:6d6e with SMTP id bb7-20020a056808168700b003a9ba396d6emr14515804oib.0.1693844077730; Mon, 04 Sep 2023 09:14:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844077; cv=none; d=google.com; s=arc-20160816; b=Gv8Nla553YAGfuxLLC0iY9lLwuiY9ObGa6JrS1Um4s1J4t52nXzMRCCJBLV3mrznTb 09AJTU2XXhG9GziFwn2voWCCY006/Xl6O6vIRxzimaCg+4U/hlaf4S96HYP6CIaakTW+ Tl9Qrf+4I6z98l2RrYDh8JwRMjD2F2oy9/xlNSQm2PLJZyFue6guoE2FnAM48POVN3h9 N98+GijEoK/x1ymw2OeK+2VLWMjBKCG81DwMZE7rdzCCAUBxQO/OZ/IYLKWbhk5fGnZu D8trK+LirTKkc+CLfP/yFTabOBSERW6juw841iEGso7Juz+unCor3ByxAYAb2qKqpivG 51eA== 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=GqyVChgV4Vj161YIUXKzjrwgE8pMJ/b2rFt1vVL3b7M=; fh=GWW/XA6BWPtMHuiUXaWtah8gQMMsZK954cP6EeU8A+k=; b=YqUKf06YItdx+IYKVU6sU0/7CTnX/5D9y8ebdWun6Xxe6PBhW32WTmXeLxVqiWFNnA a0AN6QdTvcyECUtZXpZfA/DeqId54HMByTc40n1e+Qig5Dcg6g9qaxziwdSx4cIFcvqY cr5e0C+3AjaLtMSbdsQ2PcTq85+wX76RlpCDSxYj9aUpH2GzkR7ryHKq4QuW/wrfAC7y NlK94+6eZGDdFluhBPcACzrLS1yF9pHoigXD1jaZcCVQ3OzNB6fr+RzeYSRmVwHoS4E+ S3vf4Z7ocrva8II27n/tittQBvfVmqdBN7foKQuP195exrx2jBzB4aW7U16QcnmVB25E GP9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pCCsATJL; 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 d1-20020a0ce441000000b0064f4a9760basi6645973qvm.317.2023.09.04.09.14.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:14:37 -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=pCCsATJL; 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 1qdCDT-0004vj-N8; Mon, 04 Sep 2023 12:14:19 -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 1qdCDS-0004pi-4X for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:18 -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 1qdCDP-0007jL-Pa for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:17 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9a5e37a39ecso222712566b.3 for ; Mon, 04 Sep 2023 09:14:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844054; x=1694448854; 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=GqyVChgV4Vj161YIUXKzjrwgE8pMJ/b2rFt1vVL3b7M=; b=pCCsATJL3H4tkq+4Dj3YzwlVBYwfaHMhjpDGU42h4wEOkXFBs8nKP9JzF8eCX+waEM ljqfe56qr+rCQDnsBKAsjWLMR/u9OnzxEOyFAwxYG82/GbOq8megdNkrd3AoRp6TGjZg H12hiFwxGywlB2+trbsCKDmwRr5DEdM/T0g3MhYnGB2M1azBa2XxNjenOW3Wd3kyvd/f d/05fICYAUPyHyx1jpZZMPHiToJUHpCyOglYdzWAWsgbBzA1K8u2xDEH83FhU8rjYbPX 0BVC8I9L9IIFjYSySHloBxpZIBqv6M4YMsoW/p5YYpZVjsub12NCj35SiJwXr2nw4iq/ 7QrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844054; x=1694448854; 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=GqyVChgV4Vj161YIUXKzjrwgE8pMJ/b2rFt1vVL3b7M=; b=jpRmZkSN7sZ0as8p9j1mHrniZ11siHqR1ENwQOJFXOAnSydg5ych52SlHrgLXFbR4D N1vK5bZfsiqgNmR06moWqFCdw0znREoZDsQlnIhJdF9ozaPSooke0Gxi65cuFNN8cjBn ziqlUlU79Fa/pWJ63KqbNuQHDQAy45BkP8DcwNSSAk7FdCWiPv+yQ2R0jK704p9FCpL5 C2A0JSetwx0iFzXExv5uL+QUWi7wr0kHLPtS8zjUyHLYKppIBhheci78aTM5oXauR4mV 9WJC/U8PgmkiZJk9SP51RM8+wp/HAwdN3S8hVIa5QoRmRirfLnZ18+SxsgGvlpv5WDRD vgdA== X-Gm-Message-State: AOJu0Yx+HiVqb+jkwHDVClLhATESjTHAI6COBGlA9ISC68NiTTsnLlXG wr6EppwqCB1tr/J8LF4e6e3D7Q== X-Received: by 2002:a17:906:1daa:b0:9a6:5696:3879 with SMTP id u10-20020a1709061daa00b009a656963879mr1888248ejh.65.1693844054414; Mon, 04 Sep 2023 09:14:14 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id p27-20020a17090635db00b00991d54db2acsm6338492ejb.44.2023.09.04.09.14.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:14:14 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Coiby Xu Subject: [PATCH v2 17/22] util/vhost-user-server: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:29 +0200 Message-ID: <20230904161235.84651-18-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-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: util/vhost-user-server.c: In function ‘set_watch’: util/vhost-user-server.c:274:20: warning: declaration of ‘vu_fd_watch’ shadows a previous local [-Wshadow=compatible-local] 274 | VuFdWatch *vu_fd_watch = g_new0(VuFdWatch, 1); | ^~~~~~~~~~~ util/vhost-user-server.c:271:16: note: shadowed declaration is here 271 | VuFdWatch *vu_fd_watch = find_vu_fd_watch(server, fd); | ^~~~~~~~~~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index cd17fb5326..5073f775ed 100644 --- a/util/vhost-user-server.c +++ b/util/vhost-user-server.c @@ -271,7 +271,7 @@ set_watch(VuDev *vu_dev, int fd, int vu_evt, VuFdWatch *vu_fd_watch = find_vu_fd_watch(server, fd); if (!vu_fd_watch) { - VuFdWatch *vu_fd_watch = g_new0(VuFdWatch, 1); + vu_fd_watch = g_new0(VuFdWatch, 1); QTAILQ_INSERT_TAIL(&server->vu_fd_watches, vu_fd_watch, next); From patchwork Mon Sep 4 16:12:30 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: 719991 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1686683wrh; Mon, 4 Sep 2023 09:15:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGS8C5oaxAbBMyqazr0QFoCVEVaD4fYxWk0OwZz9uwZQU/9TeT9d8bOpPglk+Sn8L4+zBaB X-Received: by 2002:a67:f1d1:0:b0:447:6cf0:7119 with SMTP id v17-20020a67f1d1000000b004476cf07119mr9441521vsm.30.1693844158264; Mon, 04 Sep 2023 09:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844158; cv=none; d=google.com; s=arc-20160816; b=PiKnYeLIiqw4ESUxpnUPKuwIAsZ1IKv5jgoca0XH99Thy7JIBoKUTb3oPmI8cXoA8o IcEnI14H24a138HBI3t6Z4u5ovHc+Bm8lm3huD31HIIwk8+YpUtwFwVphaEGa8Nw/MRp j3G70Egz2/tg/8HkaXr9BhRJK/HjOgFVPlRbl5ccTFuvtQLDSQ6NK7bw6sJTe5sWTJUP 8FlqhL+iqZQLWr4wKIkpjgww1qHQZIkBlfAd1tfYdUmGR2YnBNOiEmXRlH075mU43uSG DsJ/b5IFkcehXceLmaV5YApYckieHELFIVl5wgQLTX3EW0rajVp7ik+i4ocyuynRthB4 Es4Q== 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=GAJ8IyF6qJ4L0zeYktHFZ3FRJiDz0/SjvkZRz5aktOM=; fh=Q5UJePQCPk73Niy21rUDClvVxazdpvTyPM+Vdv/IeIE=; b=iIw7sOTMXMd2bh5Ap+COmg9XoaPVkqxDaHOrdTVEqMLOChazhCJ9KZC1fJOquXfosf DYA8yYNUwN507Vktvak8F1mjPVAM+PsgjziHqUTRdt3d0ncCLFe27gxjS83OaD+Pp9IB ZeDv7ZAPrZdrbCtOw1sR65yhJOezgsi0whnTGNUWC/8eP7iio7eoxpN5QgAnBT6SsF+o lqinGi+bG9Gl95aV/mBvXHMikNU/ZFIv3bShnYwIqc1Zk8ABoXyqZFuRsEM0UvzWtinu ZLapLTpUuxRy6eyfmUxrUelRoqW+tBIa2nE5b2PLrZKmqxuhybdk8mqjo/cWvrT2kloi AlPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UIDrm9Hj; 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 p6-20020a67f346000000b004503d271b94si769832vsm.809.2023.09.04.09.15.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:15:58 -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=UIDrm9Hj; 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 1qdCDY-0005L0-P4; Mon, 04 Sep 2023 12:14: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 1qdCDX-0005Ds-MJ for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:23 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCDV-0007k5-1x for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:23 -0400 Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-99c3d3c3db9so250363366b.3 for ; Mon, 04 Sep 2023 09:14:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844059; x=1694448859; 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=GAJ8IyF6qJ4L0zeYktHFZ3FRJiDz0/SjvkZRz5aktOM=; b=UIDrm9HjnlTLSi474CgCICY3xhEYFyAdf/M8GAeAQfUm7bW8pP1kK63rxSRuWlgveX 6VpXlItFKU+G7k9ZoWJVbiddWMR99P54Pk+wJyE1+4XOfrzqW5jX/di9LFqwjyh3fJop 105DRdg66KhXt5RTGzeoHrs7rVyIUqjdnK8tGeKOQmQYI4XMw5dSMg0CWKSgQxFpxf4I 0Rlav2/U03ITaSlZgy9gfmotlXo+XVhP2N5vqRJcqnz1UsQO3ANfWJR66jE+BE4NF1SA tQo+Y60cpbGt/GK0k5oFREVqfUjKeaDBZh4nef+7c8HbfWwSmOc4SkcQveIU7A/4u8VD dXxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844059; x=1694448859; 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=GAJ8IyF6qJ4L0zeYktHFZ3FRJiDz0/SjvkZRz5aktOM=; b=OnUVwLn6EXA/G1mO+1NiAfDu8nbz1/YMod3L4c+n+xqosFTauAjL+r49Sl9vvR9rQi ksqpsWFsT3ObEtYZT2kKtXOs6k9V8XVLN8VvYyPPMTuMmqWhrpNaHFiWDcFKKYSrSY1Z jXfzVgYoMS02MAak7VkJZzbvPuGMCWqD3PNE8Sq/Oz4uBkL8gvzCr8IpBGtGikKLfkCP 2iGd1mEJLNXv0RpaebRrojcFs7aThJ4tlv3aAgm7roWOcXW/t4BEH/TgO0B4XPYotHBK tKCiVhc/rEXx9Xechq6tYgZH04r85ehE2gm1r/PphqpU+4aaZnXSQZoz4CCCmsAZ7Q2J SuVQ== X-Gm-Message-State: AOJu0Yy7YgmwfM0t3+Lx4EknrLejqg9Gscmt2MIQQSdC1MbmFDCEgmdO Iq3GdRsQXWfMnx6oUGDVndYtfQ== X-Received: by 2002:a17:907:7813:b0:9a2:16e2:35c with SMTP id la19-20020a170907781300b009a216e2035cmr7922548ejc.31.1693844059744; Mon, 04 Sep 2023 09:14:19 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id pw9-20020a17090720a900b0098884f86e41sm6270060ejb.123.2023.09.04.09.14.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:14:19 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v2 18/22] semihosting/arm-compat: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:30 +0200 Message-ID: <20230904161235.84651-19-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=philmd@linaro.org; helo=mail-ej1-x631.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: semihosting/arm-compat-semi.c: In function ‘do_common_semihosting’: semihosting/arm-compat-semi.c:379:13: warning: declaration of ‘ret’ shadows a previous local [-Wshadow=local] 379 | int ret, err = 0; | ^~~ semihosting/arm-compat-semi.c:370:14: note: shadowed declaration is here 370 | uint32_t ret; | ^~~ semihosting/arm-compat-semi.c:682:27: warning: declaration of ‘ret’ shadows a previous local [-Wshadow=local] 682 | abi_ulong ret; | ^~~ semihosting/arm-compat-semi.c:370:9: note: shadowed declaration is here 370 | int ret; | ^~~ Signed-off-by: Philippe Mathieu-Daudé --- semihosting/arm-compat-semi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/semihosting/arm-compat-semi.c b/semihosting/arm-compat-semi.c index 564fe17f75..85852a15b8 100644 --- a/semihosting/arm-compat-semi.c +++ b/semihosting/arm-compat-semi.c @@ -367,7 +367,7 @@ void do_common_semihosting(CPUState *cs) target_ulong ul_ret; char * s; int nr; - uint32_t ret; + int ret; int64_t elapsed; nr = common_semi_arg(cs, 0) & 0xffffffffU; @@ -376,7 +376,7 @@ void do_common_semihosting(CPUState *cs) switch (nr) { case TARGET_SYS_OPEN: { - int ret, err = 0; + int err = 0; int hostfd; GET_ARG(0); @@ -679,14 +679,11 @@ void do_common_semihosting(CPUState *cs) * allocate it using sbrk. */ if (!ts->heap_limit) { - abi_ulong ret; - ts->heap_base = do_brk(0); limit = ts->heap_base + COMMON_SEMI_HEAP_SIZE; /* Try a big heap, and reduce the size if that fails. */ for (;;) { - ret = do_brk(limit); - if (ret >= limit) { + if (do_brk(limit) >= limit) { break; } limit = (ts->heap_base >> 1) + (limit >> 1); From patchwork Mon Sep 4 16:12:31 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: 719989 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1686362wrh; Mon, 4 Sep 2023 09:15:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHtxgTy2vmzMs0IRqlH71qfgpAUT4gb5zbPNALnwdRE39A2gqeqimTICaZKyctHl3cJ7rpF X-Received: by 2002:a05:620a:370d:b0:765:8204:dd64 with SMTP id de13-20020a05620a370d00b007658204dd64mr11014853qkb.7.1693844122971; Mon, 04 Sep 2023 09:15:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844122; cv=none; d=google.com; s=arc-20160816; b=An0dq3oEKb9RbSuH4MaLjOiqutfkl2IbO+avWjPBcSxGtkNjO7am5Y0/pkfEAB9i+4 ByFShmUtNxpieE4ziStwKYjq8ZYc8qIvZF2xay8qajWWPqdOaGq8vdEKjIMYLBcUQ1j2 O/yHPvofQMT/WnHezH61nl7kFwO1dUJsOnAL+pQYj8ZynHkh9KOEKMgCW0tUXIC9BPGH v1zrypJUgauqHZXfOeTeG/YRPorBwrp0mHJKGCEo5P9FS4ZW6TMJXywlBYU+21/Jehco kj6G91HR0NtXcQJABtv11ZzXwwKCVe4AxISANFZtuzFefxdVwD7bsEaiBSqPm8yqVoXs 8lVA== 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=ZsTnNe2odIs1TlMwUjNe64GWSQVkGVh+b8/mlWNguvM=; fh=M4+wifAeNQ6fagA7lq67eYgVVAfcj+heqTkZZhMPaG0=; b=v9OyPmSkSU487/+T58NcAocGsZ3etRntSCQ63ZVcjubOf+p8fIfbFLj0ST8x/OXR4n bOYTO14oi0+Ty7XSiwOrBJj7TpoinNh77OffCY6tTen5G3F94bIKsii5TvQSgjnr3Box lPVgy8UcPhHTkDLYR1uPT0sAVSxMXavn8V9nRN6lMCzLqKMAR4SHagcgvtwVBseTfylD cZrEFmtoENO3veWP6/JSpBEQFT6R0hj6BXMc16p2CHWqql99Ufmfmdxw9KBI7Aq3Mlwg TsSYRBdgRVOa77jPBBpbxFvqZ7DEJ+f0mfhaguX/nmimS8TVF4j2L8BFQpfGjOYYWr9E Mr1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g9QVPfK4; 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 d1-20020a05620a240100b0076d1fb36875si7079490qkn.459.2023.09.04.09.15.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:15:22 -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=g9QVPfK4; 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 1qdCDf-0005jg-O1; Mon, 04 Sep 2023 12:14: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 1qdCDd-0005aS-7L for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:29 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCDa-0007mO-Gf for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:28 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-9a2185bd83cso241072966b.0 for ; Mon, 04 Sep 2023 09:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844065; x=1694448865; 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=ZsTnNe2odIs1TlMwUjNe64GWSQVkGVh+b8/mlWNguvM=; b=g9QVPfK4eZnVme7n94l/byTu2MOkqs/7+pfhpNlvhSSd0M99+ZL5OK59FjqmdoEL8u VgHW9cHqYqj5epCqSn1gETL0OQvsBXHUzWJ9bSdMe477etsXWR4ngCOh8yG8kcjd1btS z+U8pqD7Jzmd61Gq6atqUFUEie/q1yoT6sRV9T+gJNbu9k0pwXxwNMgQCzk4llc5AUqN 2DKg+8KUO5DBn607uhsra33KwbegPgKc1NA+tPaA3qDA808Y5abKAyOmGxbyoLdsbMLb xUK0rWmAcu8B5DpFIZaPCmGNoy5MLtK/WqAp2j8MNkvjUVVbNKYiEXJJF7dVjCgSdWo+ VMyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844065; x=1694448865; 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=ZsTnNe2odIs1TlMwUjNe64GWSQVkGVh+b8/mlWNguvM=; b=D9BqUqh0fqjj645M6D4iBnT/l55VrC3lrM2iYlr+6Xoa6uG43Pl/iPsDL/U51qZtKS k3ktsLaqWhb3shAGF0Z2Bagu5gAssKbrdvFai30o9EK70KSH52eMyt7DW8lL83fPDpox ct964A/JQuq7Dz2AjJ+/0V7eDSU+qBkbTMj5dZS/SMDARIkP2kDF9H27YeKWS26+MDvg sHpJdzsWHipy/BrMz3gJFdJYtSfubSgNvY4iBnSjDUMmv1DnWlEtsY9fYwrHtoKcMlzD KONtlaoQwfROC0LT3mOhMuLHGsflAHZd87pDLnJHWiBnRgC0yF5XezQQ5Bj1w/u3qdoJ a2yQ== X-Gm-Message-State: AOJu0YwL/RKAsmrsp/rCvsy0CdTNBBWcfpxgrBu5cFb1wypM3URg+SV4 fKXA/84EK2c+9l/j017zoumhpQ== X-Received: by 2002:a17:907:75e6:b0:988:9b29:5653 with SMTP id jz6-20020a17090775e600b009889b295653mr6541467ejc.77.1693844065083; Mon, 04 Sep 2023 09:14:25 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id f3-20020a170906824300b0099b921de301sm6338473ejx.159.2023.09.04.09.14.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:14:24 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Laurent Vivier Subject: [PATCH v2 19/22] linux-user/strace: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:31 +0200 Message-ID: <20230904161235.84651-20-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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: linux-user/strace.c: In function ‘print_sockaddr’: linux-user/strace.c:370:17: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local] 370 | int i; | ^ linux-user/strace.c:361:9: note: shadowed declaration is here 361 | int i; | ^ Signed-off-by: Philippe Mathieu-Daudé --- linux-user/strace.c | 1 - 1 file changed, 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index e0ab8046ec..cf26e55264 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -367,7 +367,6 @@ print_sockaddr(abi_ulong addr, abi_long addrlen, int last) switch (sa_family) { case AF_UNIX: { struct target_sockaddr_un *un = (struct target_sockaddr_un *)sa; - int i; qemu_log("{sun_family=AF_UNIX,sun_path=\""); for (i = 0; i < addrlen - offsetof(struct target_sockaddr_un, sun_path) && From patchwork Mon Sep 4 16:12:32 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: 719992 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1686684wrh; Mon, 4 Sep 2023 09:15:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF4K52GjwMshre/pucsYQzgjsiGErsTRxDT8KDwVNxZrJq6q2Vm/UJKQmUTiq3Ntv68OpAG X-Received: by 2002:a1f:ed81:0:b0:48d:2bcf:f95b with SMTP id l123-20020a1fed81000000b0048d2bcff95bmr8647690vkh.12.1693844158255; Mon, 04 Sep 2023 09:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844158; cv=none; d=google.com; s=arc-20160816; b=D2DsttxDBeUi8H7CY7vmkS0oTmaAo/ALiCULc+t86xl8GwXbvf/r9u7GqTBNmQQhZy plB9Mx+5qTYfnBZWaW5IzwGW/eKf1/eyK6NLrqLteJ94lGIhvySgicW6h/nr0F+vdWzZ oB5oA3EUJKOLvs7ekpIsHcLSc5QPoYPHswXnfZGVRkIEUWg+h6+8nH1JggnL+8/FY2BP 8wk4P4WSx/1nUBpKRXPm50gTSGMp+0v5fZQQHTLYJ0iJuDmx9yH/jHW6r4S6r0fvybZ9 b6XDVz8+tLE5cRulsBxlf/hhSsjwcfaVz4hUM0jCK1xAiY9e/iHceDd7mgvbXNKKoD4c oSAw== 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=cMEDuaLQl2rndB/NRBV5I98EXlThcHP/dGz6BGvLChg=; b=DpJPKQws4wYgiUOCSw5L6UTnyBMkGgBshpfj8J9KTW2Q+8YUGNr5XGYsAv8T+6NOmw sYmNw9fJtAu6FNK+xSPPW8kwB0vSuB2xakH/EL80XT4TJ8ayhdm8102CXABP+Kx13Py2 XUdMEQ+hfECl6kL0RCB1YgUWNDeXqJXLBhzIne1rsgO0j1Vg/RYGL5FgRj3ndYL6Tco0 hJTM3OpiGrYsofzwMgA2oRk/mEZqjfTpscyqY2iewRrBvB/hEtD2xd7Y5+6La3R8k5cK ZdCACDKBew2r+PHZCn44mMyx7SuHokc8kKUQge+7cDDXvdOQt2AbcA9hNSShsJ4gIr47 xZzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h21mdo5j; 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 c184-20020a1f1cc1000000b0048c30f79e1csi1235249vkc.290.2023.09.04.09.15.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:15:58 -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=h21mdo5j; 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 1qdCE0-0006Rg-CD; Mon, 04 Sep 2023 12:14: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 1qdCDn-00064Z-5n for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:40 -0400 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCDf-0007nU-VN for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:38 -0400 Received: by mail-ed1-x531.google.com with SMTP id 4fb4d7f45d1cf-52a49a42353so2351736a12.2 for ; Mon, 04 Sep 2023 09:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844070; x=1694448870; 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=h21mdo5jeZ3kRCvq2SP/f6C4WDo/xWOTeLsY9vOo0fq7vH54j9u/J07N+NWmXchhHN ZTiRWPsFxHTh8v3VINzmFvAAtays/Rjr45UyTx+r1Lf33C4H92RDTJsYkXwEbIR6EBMR i7psqeEOfECjjOa/XdfQvjZ6G1VyBX+HSBqAxaX/7QM5xBic188TwNJySItNXTArry7l tifaZmKOeb5Xtm37Osl6Ah1NxMIQUxab+7AgSiB6say7qhYKH55t96S6+enpJGbGTdte ImbwqcMYAZPSF3BXerkWDmf+MoCWWxOap2OxuHMNBlJ9yYdCDlAdhmpZFKu29o5dd6MT 3kWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844070; x=1694448870; 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=EzPmxLry/Qd+26QPzNAbyZB2QiC1Jn8x8/Qz8r80vDd+mkSRNi3Zj0qott+yleFHrP pmWbzssrBvZT55Un1IfSdzHuwRifmVYu1gMUF3OptBWssI+CSZVPMm3SkKweXOOlFJpU 1e7Z6EcTCx92fsaq1EbP4bflfdsjYDhcUaZUNb+hx5QiLZqsI6RRICu1busvkfTpu2Ss dAkDFtpPs3XVCAQMz5Qtxgo1lBFppw8L5LSdyztJDACFa4fzYbMNiW0y74tLtuNlSIvN yintusgDDWs53PByQl9dY63t9983tGJfP4Dk9Bs0zWkB/0jIC9UzSo/aGf6xC33lsvXb CqXw== X-Gm-Message-State: AOJu0Yykd12bG7bCHSizhfk1SAvKvpA7PNfnOxLuY2rmpGzUexUU6L0Y 1odnqv6wLB/VQp1loSaMkclcNw== X-Received: by 2002:a05:6402:3202:b0:52e:585a:e95 with SMTP id g2-20020a056402320200b0052e585a0e95mr452717eda.2.1693844070498; Mon, 04 Sep 2023 09:14:30 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id c21-20020aa7df15000000b005254b41f507sm6024930edy.32.2023.09.04.09.14.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:14:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Alistair Francis , David Gibson Subject: [PATCH v2 20/22] sysemu/device_tree: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:32 +0200 Message-ID: <20230904161235.84651-21-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::531; envelope-from=philmd@linaro.org; helo=mail-ed1-x531.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, T_SPF_TEMPERROR=0.01 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é Reviewed-by: Markus Armbruster --- 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)); \ From patchwork Mon Sep 4 16:12:33 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: 719998 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1688052wrh; Mon, 4 Sep 2023 09:17:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEuTBK+RCIvu6q3TLK06ypiEElNuVACAQiA4IwPtSNdneZf05cW5gy0IAYDayavRpq2O3Si X-Received: by 2002:a0c:aa17:0:b0:64f:42eb:92ea with SMTP id d23-20020a0caa17000000b0064f42eb92eamr9563404qvb.4.1693844270224; Mon, 04 Sep 2023 09:17:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844270; cv=none; d=google.com; s=arc-20160816; b=yoUbJbeJYz/zkNZCgPKV9u9Lz9kwKHBj8XoIyNQsvLehky0h4af1Wd9gdh7hAXlsmC v3gkJQK3yu47dxF7KVYiTcjlEPggyf03qBpacSP+ds0FJIR3MJo9IBthXTROzZKiBULL WObKx6ymD3Yj2i+u5lbLp/ZjNeybx2Bv5/sURmg4NnMNFIOwbPFaS4BstXn2BdGQbWmR Okl6G6n8P4bOXCRaNPxh3otmUcqUPXns8Zvhg1/02wX/B/D6sOm2eytuW/zyg2SQzT2U Up239+YHPjptrBKtwVSR5w0GAg+cVTyMqfQv2zeyt52TjlmxJA5jm7jFJAxSVOQevjVK czAg== 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=Bvkfrc224yUF6DF6DTCqAYqVQw+ygdwws/3+78VrLoI=; fh=MElCG/6yDCeRpcqa34t2QL7+fMSFmfIbrQnnAk4IUjU=; b=ZavLMt4U0zXfJ5+A9xDIB4Op3Thtk9dqyYMWmtlEco4gyzcz6WYdg3+ZV6iNqATfeo 7X3uj1B68o/Cx2f0GI/yfckbyAqb8mjaCnxMUBCl8rooEJEBhSnui45lx8zvgN6WAYYo rYan2EmV7KrrEyjmwauICghBNy3yx6ejoyjht3JFgWaYOvkVSdX0UAzba/n+IM32ibuY RZmAWpdQrDRjNC8QKXArn16GslCWBDdDXAc+5mmFt8gbUyRDZVxURkaRfoXaXHhGFDoY 71Qc1b9Rr9nsFVte0SafWG/7ssoOBTVLPvkGcUCtgtJoEm3ApAZeWx/f7KVsuqERjs62 5zNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=acI2z3s3; 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 d20-20020a0cb2d4000000b0064f66ae4bdesi6524154qvf.294.2023.09.04.09.17.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:17: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=acI2z3s3; 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 1qdCEU-0007HN-5R; Mon, 04 Sep 2023 12:15:22 -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 1qdCDp-0006Mx-NG for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:43 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCDm-0007oE-CU for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:40 -0400 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2bcc846fed0so24824821fa.2 for ; Mon, 04 Sep 2023 09:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844076; x=1694448876; 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=Bvkfrc224yUF6DF6DTCqAYqVQw+ygdwws/3+78VrLoI=; b=acI2z3s3au07RftiPtQGrY/MtiI/7MaaawUW9yLXUFwLCfJrUX39c11gTVG1Qi8iGV kbCWCcIfvA87LPXEB6a45SL3Wx/Rj1GXV1Y8p7JHKVzPnEiNBqUOwQJ9EhXdJ3BZpac8 weJK13x562VxCKxeQ2TsyIyRmrJ+slg/25sMB05f6NEJZ/lY61g7nWrQ4T/6uFPzFLp/ RUdmLycVPhiHsV4zW580LhXWKM3T7Ag/IVsE4vG6ZsyHObJe81++nJD3GoYVDxksc6s6 CTJiTwVVmhrKvwpWp9cCmv+3RNemsACe+wIkZQ+Fi5d/MlnQSYz68aGjea3MLMprzfcC 22+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844076; x=1694448876; 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=Bvkfrc224yUF6DF6DTCqAYqVQw+ygdwws/3+78VrLoI=; b=LcVoWXp9bMd8Qms/BEMssaDYDCGR52O3jIjVgQVNE3vHOfmUpOFNlduCXr0LcmIxKr CqR+HAIRRNGoL2o4nFMRqv/Jc2JYrbihEnEGP/JUYrYh6J8zXTDOu6kOaF+HZe7Pj0Xh yXi9QxMOf+mmelu3bXI+mPC1SixxattA0yoPZX31I1QW3aT2xFDE6nfciR27k4HsU7Nz GbZXqp0vPFBjDeyvsDJR7BgRQi0qHx/2nSRZb46dtHwauq3SJm6x7yiXQ1JV+5lq+YTG T2fEfTs+g6tED5VBpH/L7UI2ykycIYz7RZ+NWBzeUILdpWS0c31I+32YSlhdVJznH0f0 ubrw== X-Gm-Message-State: AOJu0Yyse1+mZ9fSi3NDGO5Iao4FyfmLg6xmB/MiS/X1wmt3NITWdf73 T69JjdfTqVBpBEvWlBsY/bITnQ== X-Received: by 2002:a2e:81cc:0:b0:2bb:9fcf:6f64 with SMTP id s12-20020a2e81cc000000b002bb9fcf6f64mr7227876ljg.28.1693844076054; Mon, 04 Sep 2023 09:14:36 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id qc8-20020a170906d8a800b0099275c59bc9sm6345022ejb.33.2023.09.04.09.14.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:14:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Paolo Bonzini , Peter Xu , David Hildenbrand Subject: [PATCH v2 21/22] softmmu/memory: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:33 +0200 Message-ID: <20230904161235.84651-22-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=philmd@linaro.org; helo=mail-lj1-x22c.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: softmmu/memory.c: In function ‘mtree_print_mr’: softmmu/memory.c:3236:27: warning: declaration of ‘ml’ shadows a previous local [-Wshadow=compatible-local] 3236 | MemoryRegionList *ml; | ^~ softmmu/memory.c:3213:32: note: shadowed declaration is here 3213 | MemoryRegionList *new_ml, *ml, *next_ml; | ^~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Xu --- softmmu/memory.c | 1 - 1 file changed, 1 deletion(-) diff --git a/softmmu/memory.c b/softmmu/memory.c index 7d9494ce70..bf48350438 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -3233,7 +3233,6 @@ static void mtree_print_mr(const MemoryRegion *mr, unsigned int level, } if (mr->alias) { - MemoryRegionList *ml; bool found = false; /* check if the alias is already in the queue */ From patchwork Mon Sep 4 16:12:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 719990 Delivered-To: patch@linaro.org Received: by 2002:adf:d08b:0:b0:31d:da82:a3b4 with SMTP id y11csp1686665wrh; Mon, 4 Sep 2023 09:15:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFL8i0xawHeknGL39UMSiinO/cDyY0m5QNwUnSNuripSTwq8xmJxGAqZVk8KXw8/knBqtVu X-Received: by 2002:a05:622a:14d:b0:40f:f22c:2a30 with SMTP id v13-20020a05622a014d00b0040ff22c2a30mr14712736qtw.59.1693844156366; Mon, 04 Sep 2023 09:15:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693844156; cv=none; d=google.com; s=arc-20160816; b=IHa5lXO6mEGdpShD0LOA7meCq+VSRs6sR0NLLjwlOTDONmHQxyw4S/0oetWIWJ1VVk CnCR4hO1i/iXlhoeldkju0Vv+yvzIKd5ZPKIDkn7i5zUX/RLzicduZSZJ/HoxVJwMPJs PCU0Gih3nyYyrC/SYDeAKZvdgnPVbS3/9ctrLU0uRHcRhOcQv4r3T2B6yC9qEytCtBHb GGM3F/nu4f4rb7faAsS20PjI+3WBaIUQijbFTJR3ZPXVt5h/HrG+0tQWFS23+ut+6AjW REHFIpf/k6DXb1JrnTfVfHu7dCScNV4osfCs4A3K+GPh2ss0bj3FKpVAJDjks0yPlWeA EoTQ== 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=7aoDCyS5ybRvtm1vEyqjvOG3g4YR7gaGHrXcT9ATxAY=; fh=MElCG/6yDCeRpcqa34t2QL7+fMSFmfIbrQnnAk4IUjU=; b=rFckmjnkCJgYKJurcyz1lYkudUOPnik83Qo+F4FF7EILro/Zt8+waJBrWyZbuGPB5O sN7oLv8q/FMDkm0sqeLvoHngm7v7Nhqp9K8Q+/LYEQ1lVNUtSRxd7FF82R009rxFCVXi pdBo7eB7SZUgphvN1RzlNeWT/fMNDKpX6JGVYJAeEMjiH/VjLubAR/9jY0MuNsd2q9Rr J72eTqPZBrInBVMjTCnDe7BS4xlT4NVE7KURUe+DSNIOHuvQl0wW9i950UGLzvfRark5 5TVp0EZyays4Twg9FnJ7B7i/4Wx8/GsU2LXo+ZU7O0gFMPDeJKlLbP/ZN+Nkx6Vzjsdn VdTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=d8wl0Cry; 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 c21-20020ac87dd5000000b004035c106304si6699603qte.470.2023.09.04.09.15.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 04 Sep 2023 09:15:56 -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=d8wl0Cry; 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 1qdCEF-0006my-V1; Mon, 04 Sep 2023 12:15: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 1qdCDt-0006RJ-Po for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:46 -0400 Received: from mail-lj1-x229.google.com ([2a00:1450:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qdCDr-0007pH-6R for qemu-devel@nongnu.org; Mon, 04 Sep 2023 12:14:45 -0400 Received: by mail-lj1-x229.google.com with SMTP id 38308e7fff4ca-2bceb02fd2bso23381221fa.1 for ; Mon, 04 Sep 2023 09:14:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693844081; x=1694448881; 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=7aoDCyS5ybRvtm1vEyqjvOG3g4YR7gaGHrXcT9ATxAY=; b=d8wl0CryFwrT5WsfMuzWbQsPqi5uhGXHshmapQnQEjQDef82AZ0hs5rHTx7qAD1EbZ U+9ezAEDfL+H8KfPRQC1SH7d3H86+EoMEGM38ShZzijJM9iRIBtbmZt8GB/lhHoxzUxB uL0NcTvO7T8WtvlifHIzzXYfItTCF+A1cHoe0kd/0qa0AgoZUuOLj/+7adcjk/Mg4tV0 pEKKRVXQO3RSo+u1IEC+G4Td3d2mlYVXHqKWQ4q3KTEyGnaRZ3mkpo/t4n0BSfOj6B5r SKhWB2QE/ICc4FpuNezPz2JFrso6v2/q5gmifeY8D912Umh1HXbNF62btx+pNc7RYcop xYWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693844081; x=1694448881; 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=7aoDCyS5ybRvtm1vEyqjvOG3g4YR7gaGHrXcT9ATxAY=; b=iBEa+VWXZgLuuRSBSJ1lldERJbj8Zhb++HNL7Z72dTHzgkNEdKjpyCjTDqUI2B3HUL 9x1nb+yIoP0+c9jSVZgaU10xJ7HwqP0bZtxfyxmNs8Jm9ENjxc4P6GPgY6Rx1kOSvOkB UNdtw3BjtvPeJ75q7d92IvJKAUUN7SWQ4Kmg/HS4hg9uH5aCd2LYQiy9tuW3CBhsDPV2 VOFZiqVrRgIep1emN8f4ApkqAMEYhTxgHSQU+vnLZTvlPqAmT+j61XIebToq+GKr8qfn EQZtjYhSgE8payZRfbszNWdhezHh+vrzUj6ICE904cag8p72SCIejkFXIhfN+4B0OD9L Uj8g== X-Gm-Message-State: AOJu0YxdgsDVTg0dW01MVB7oe83uuYTUXvqodnvucRXN3dDG7HSgCOwS smeq/jq0nweNZS4qJVFmW+IallPMDfHCSuSPy9w= X-Received: by 2002:a2e:888f:0:b0:2b6:de52:357 with SMTP id k15-20020a2e888f000000b002b6de520357mr7656493lji.40.1693844081518; Mon, 04 Sep 2023 09:14:41 -0700 (PDT) Received: from m1x-phil.lan ([176.187.209.227]) by smtp.gmail.com with ESMTPSA id x24-20020a170906299800b0099cadcf13cesm6377093eje.66.2023.09.04.09.14.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Sep 2023 09:14:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org Cc: qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , Paolo Bonzini , Peter Xu , David Hildenbrand Subject: [RFC PATCH v2 22/22] softmmu/physmem: Clean up local variable shadowing Date: Mon, 4 Sep 2023 18:12:34 +0200 Message-ID: <20230904161235.84651-23-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230904161235.84651-1-philmd@linaro.org> References: <20230904161235.84651-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::229; envelope-from=philmd@linaro.org; helo=mail-lj1-x229.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: softmmu/physmem.c: In function ‘cpu_physical_memory_snapshot_and_clear_dirty’: softmmu/physmem.c:916:27: warning: declaration of ‘offset’ shadows a parameter [-Wshadow=compatible-local] 916 | unsigned long offset = page % DIRTY_MEMORY_BLOCK_SIZE; | ^~~~~~ softmmu/physmem.c:892:31: note: shadowed declaration is here 892 | (MemoryRegion *mr, hwaddr offset, hwaddr length, unsigned client) | ~~~~~~~^~~~~~ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Reviewed-by: Peter Xu --- RFC: Please double-check how 'offset' is used few lines later. --- softmmu/physmem.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 18277ddd67..db5b628a60 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -913,16 +913,16 @@ DirtyBitmapSnapshot *cpu_physical_memory_snapshot_and_clear_dirty while (page < end) { unsigned long idx = page / DIRTY_MEMORY_BLOCK_SIZE; - unsigned long offset = page % DIRTY_MEMORY_BLOCK_SIZE; + unsigned long ofs = page % DIRTY_MEMORY_BLOCK_SIZE; unsigned long num = MIN(end - page, - DIRTY_MEMORY_BLOCK_SIZE - offset); + DIRTY_MEMORY_BLOCK_SIZE - ofs); - assert(QEMU_IS_ALIGNED(offset, (1 << BITS_PER_LEVEL))); + assert(QEMU_IS_ALIGNED(ofs, (1 << BITS_PER_LEVEL))); assert(QEMU_IS_ALIGNED(num, (1 << BITS_PER_LEVEL))); - offset >>= BITS_PER_LEVEL; + ofs >>= BITS_PER_LEVEL; bitmap_copy_and_clear_atomic(snap->dirty + dest, - blocks->blocks[idx] + offset, + blocks->blocks[idx] + ofs, num); page += num; dest += num >> BITS_PER_LEVEL;