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);