From patchwork Fri Sep 29 08:50:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 727611 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp332449wrt; Fri, 29 Sep 2023 01:53:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGypw+RJM6xfDRgqGcOT6+r7h8ZsGuWHIDaDtQjnbMeJ+92wpL/JmvNgnG4LORg/FKpHUUB X-Received: by 2002:a05:6214:3d89:b0:65a:f332:10f9 with SMTP id om9-20020a0562143d8900b0065af33210f9mr3949144qvb.31.1695977638869; Fri, 29 Sep 2023 01:53:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695977638; cv=none; d=google.com; s=arc-20160816; b=0MXqVnjHLxIdcp3HRP18qIj24RKJ012bFpLTKtKL349otS78n2tU9UOCbRuB+v4u/R QzOSRdKrrmJ7TfDGs/mZ8vM/BOcweQOIQtZtfZwwdfMwczWhe7Jughm17RQVrOiAcF9X 10Q0HqCvxJWlnjJQCybdzhYHYp+94OMtnxQ5tpYcd6KgjX8udBtttDAj7UxvgKz/wbJc +23r7l9zCYWEHjcgUSmubmC3brSDIUzvpWYs05ks8tbOvwld3/DQBoRXQ14+i8fhBXdR L6GikAwhj+0iwnrqclYFw3Efq/WMF7g4YgYqc3diZdtzzAUGgCsH8qf0SrIb404rujk/ lYtw== 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=GLS8hKYIud+QsFyN4gSipeI/BAQn5RSSiAuPEBlCmeE=; fh=Z+dvssxbQM7eXtANqJ47vy+t1tQRtHmIMmw64Hhqipo=; b=wEY+rVe4gIu+oIl6beBGt6g5hqn8V4t+jFI9hvBYs3+rkpcgKPxke/wv6CJ6vngrWb DuEKz5fPianMBMCmofcEyQZb3l1MDwJDp8z0QFY0BB519wpqe0kDEiFFbX5TNPSnoAEn oSM/WBe6z4zoi1TJFM0DWJqfTOzDtVRhFj6Ye9xQbzqJrI4J2T5GsGzevtL6I+m9c+uv KRnIU1aliUI8moz+wojeJ9LDvf0FzhOWHJL7Th4NWRfQoUZYgjWspAa533ylkDKQ62sL hx+QaCTywC8oxcL2rwjtM/JSlIPV67EQOD0ugD4jezzA1HD4Y3fICtfJ8VZrHcY9RoXh toQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LlQ322rm; 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 f29-20020a0caa9d000000b0065af18cab63si7083540qvb.346.2023.09.29.01.53.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 29 Sep 2023 01:53: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=@redhat.com header.s=mimecast20190719 header.b=LlQ322rm; 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 1qm9DZ-00058W-BG; Fri, 29 Sep 2023 04:51:25 -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 1qm9DX-00054B-6w for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qm9DC-0005cZ-Pp for qemu-devel@nongnu.org; Fri, 29 Sep 2023 04:51:22 -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=GLS8hKYIud+QsFyN4gSipeI/BAQn5RSSiAuPEBlCmeE=; b=LlQ322rmt7mmPxrBcWwGvGJDU64JwAUfIQJJB4P97RpiZhSxtbLCyq0UCkngBysAcXk4Ln YEM7cVLmnUuRD/jDB3SsS4CDN79CnrhmzvLsjkmVmmpZEXODO1T1E3C342/jyDu7OQ+7O3 zKO/gnZ0LDQ/OBLFFvjNko0FYyfNQ5A= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-561-NZ8KM_5dNeahbQNplMww3A-1; Fri, 29 Sep 2023 04:50:56 -0400 X-MC-Unique: NZ8KM_5dNeahbQNplMww3A-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 82CDD800B35; 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 6046E40C6EBF; Fri, 29 Sep 2023 08:50:56 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 7B17A21E691B; 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 15/56] hw/arm/virt: Clean up local variable shadowing Date: Fri, 29 Sep 2023 10:50:12 +0200 Message-ID: <20230929085053.2789105-16-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.2 Received-SPF: pass client-ip=170.10.129.124; envelope-from=armbru@redhat.com; helo=us-smtp-delivery-124.mimecast.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, 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_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 From: Philippe Mathieu-Daudé 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 Message-ID: <20230904161235.84651-9-philmd@linaro.org> Signed-off-by: Markus Armbruster --- 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 8ad78b23c2..15e74249f9 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -801,7 +801,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. */ @@ -812,7 +811,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]));