From patchwork Fri Sep 29 08:50:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727621 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp333732wrt; Fri, 29 Sep 2023 01:58:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGry1b6s/hOH6oLk06zZ+wgHN51+Hhi3s2spbpAeFzJ9bOVl1SE7U3yM8E+8OGDhiyJ9i0X X-Received: by 2002:a05:622a:513:b0:419:4bdf:756b with SMTP id l19-20020a05622a051300b004194bdf756bmr3914936qtx.36.1695977919173; Fri, 29 Sep 2023 01:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977919; cv=none; d=google.com; s=arc-20160816; b=OTF++EJi2w+ltVLpZ8FAwHOBTTwgCfXtdXvOuyg8vgMZBzaB4lEVXg4PTqT5MUNSru Ds4I3qym3YkvgmRikYFQY5tvCaEx+ZbewD8O7a5bklKyGX4wZo4xbHIz68rgdkpkoxBS r0hglXrkMtqe6DyZwwM7PRPZjeQ/3mN3IkQYusgnaAyQbKOHC5vsmMBe/D/UOdUiH7qJ EblZGJJ9/q+heLpSqBoJYzg40BHzTUkpmVlXqRNGp6MeMK2SvS0uZy+DfyS4mS6ieqlQ 2kAmM53BR6Nv1AFk8fn8j6X+Fl6SygtD8/tD4REfdMmKKIYkspDxODVtqmc3ne7NyJQR /kFA== 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=n6mHNfgmRFfmrHLYyODE6mZv5yjPRcsdm2kcZfvXjpY=; fh=Z+dvssxbQM7eXtANqJ47vy+t1tQRtHmIMmw64Hhqipo=; b=JxjfwfFVki4Nd4ZI86hpr/wNu4PB+x2Ebl6ws5jbsNzGzEBSCyoOWmUlisUOzL43Zd R6xhTN77TXlovqzWAgDO0jWQwXBSyKhMAWFACkuZMClKBn0DjO8bp3CFmGfzmh3wRFUe zrQmb4I5JqtouFvDwA1aNLj+Ql7WWcA8byrVzL7L871X00HD/5AIm/KfIR/DePmcqJrH PcSX1aMe1ZYoL+DBwTTaA/fxxhuczSoSkwuZBG0t1I4Xo9CAknJhNMZ6ASAfmfdkekWW quLcbvaNb3im7f8GhJZei8+fWBu6qcalO+mGJRtn6hgXd7pwEzC3ckN83PlExRELwWGP fe1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=gNIoHz5h; 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=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id tn15-20020a05620a3c0f00b0076db59242a1si5130542qkn.468.2023.09.29.01.58.39 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:58:39 -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=@redhat.com header.s=mimecast20190719 header.b=gNIoHz5h; 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=redhat.com Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qm9Dg-0005EC-5I; Fri, 29 Sep 2023 04:51:32 -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 1qm9DU-00051a-Co for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DC-0005ca-K3 for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695977460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n6mHNfgmRFfmrHLYyODE6mZv5yjPRcsdm2kcZfvXjpY=; b=gNIoHz5h4YaAJaC9+zQdsCCacrS2yUM92IQ1+Fjetz7p5oa2c2ATi73wyi2BVWIfmyQcd6 LEHiQ3u1TlJeCc8cqAo2IhHVuM6GOgWSKkoDYSIt1umlmbdFrcWE8t06iOn+0hmeOtr65G 21mv+iapwRNEkSnymApYhbohAdj2wLg= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-310-1soWmgaCNZedDtQxa4npTA-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: 1soWmgaCNZedDtQxa4npTA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 893FF29AA3B9; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6645A492C37; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7DF6321E691C; Fri, 29 Sep 2023 10:50:53 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Subject: [PULL 16/56] hw/arm/allwinner: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:13 +0200 Message-ID: <20230929085053.2789105-17-armbru@redhat.com> In-Reply-To: <20230929085053.2789105-1-armbru@redhat.com> References: <20230929085053.2789105-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 Received-SPF: pass client-ip=170.10.133.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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 From: Philippe Mathieu-Daudé 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 Message-ID: <20230904161235.84651-10-philmd@linaro.org> Signed-off-by: Markus Armbruster --- 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);