From patchwork Thu Aug 31 22:56:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 719037 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741823wrn; Thu, 31 Aug 2023 15:58:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJlugFrUuXzTdekUPoZihsF8ebjdmr/619VRZZNXKS1UzASfkf7WHG+GaRckQXWzRzNChb X-Received: by 2002:a05:620a:198f:b0:76d:b0c3:5aff with SMTP id bm15-20020a05620a198f00b0076db0c35affmr971399qkb.74.1693522723626; Thu, 31 Aug 2023 15:58:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522723; cv=none; d=google.com; s=arc-20160816; b=fmAZhV4OXBSUR23WHT4IhMBSIUR47vzm3N6ICgqHH6gW7f40f/FX0dm/3yATln0l+e Rpx6TcKiPJbs4Rhdu8OuU08a+Q4WtFezqCIW+jHa8oLqvUCFBeEBcxa97r25HUaUfpUA xbm959Tkehvxzcm0/ugXDTxmljowarR3e8DXRmavj+NNX2a//zk0ZjrFNtR/bbryeQN+ D7kRVlfZgJVcfbQCD1zYicvbDsQZJ7HJAS279HRKKGmjO6IGd10+b43e3vbkL3SaPfeR L77if439wNdv9LDmuhsPUSM1ejPDHPNg14YTt1q5LK26nig50gysUFVzuIoLxymlIRLr QY2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PQQ92YswPrJjLh8GJHh2K0OTvyaJRT2v7+qtQtVGLSE=; fh=CBl7qg6Xhfzjse9V+dxyNEdr3C/AYoRggW/zcQwfpDs=; b=c62zhxmtyBw98WnAQ3MIdNYSe6s9eDHK56tzmdBMw6OM/MbRLQsOpv1K49Ij3MTeFb DJjPzPAYhq4DQgyW2nhTbB14ZO1TY+xsZc4ILryIgd3UzCohFiAgFSxnSXBVpVLJwenB Rx3BXtT7DIEaFkJvr8EPWQCdx4EmpGVfNr9b9UlkptGn0MT9dNQ5Xk00JPCGqs28tRzW ldv4mPIZ8FinvHi7/Zdl/bT+4xZ6eJxGbRxv1yu+xYcBq6vhxilt4bNXrUpBo4iqZ+1p aDIAeXUEGI/ilObPyiSGiCe42zyOITPgUmeojdM4aoHxR1UD+tKbd+SXzsHyDVeN/wo/ c30Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=volQLzVT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id qs12-20020a05620a394c00b0076d512665e0si1624766qkn.47.2023.08.31.15.58.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:58:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=volQLzVT; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbqap-00040B-8X; Thu, 31 Aug 2023 18:56:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbqaj-0003ya-Gr for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:45 -0400 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqah-0002su-73 for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:45 -0400 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9a5e1812378so157777566b.2 for ; Thu, 31 Aug 2023 15:56:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522600; x=1694127400; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PQQ92YswPrJjLh8GJHh2K0OTvyaJRT2v7+qtQtVGLSE=; b=volQLzVT7NPtC6xojkdLJGx+wzd1RhzBa0sD7ExXP9huapP61zVcVYxu3kXCpqntiK U4M1jrWh5lphCRLly1h7XciVYBC0yznfylycrBMR8fLDKxcXPpxzfJsh8VZMApYETKVe cqIU8QPf4y63PLecbN+KPLMsTmCqOLCXDuOSt4FL2uP1sqMxgSF0o2x1pdSqcMNptGcn xu/DdFzhlCGU/P+/vEJqSUh9DGF43162II2zf/tylgvmclfjAjhCtlg7mhFuUHxzsdHO kEiQx38K4XS7kJes0g4839HGF+AnmETOHw+bigPlJO02EcIeE8VBbIrKYNmqfO/WvL8b I+0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522600; x=1694127400; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PQQ92YswPrJjLh8GJHh2K0OTvyaJRT2v7+qtQtVGLSE=; b=HFUoofylk1GtyV5B4ra43Fb/iPX6g7b1NbEvNk/BQDLwVShcsKeDgpUt6aYrZFVuwt 2cSrvOghY1dAKEO/BiLErjhWDfMQyOGi4+MfSjCouuCA0zVMoLXC6mEetV4wDUVoqNUM 2K4/v3osb9NJgZm8bHMaXKbYyPk73ckpIBsrHy7fYVHYHMt9fhiPR4sNtnA8vAsrjzJW kY9Aa89vPySOq5Q/1gXrZZ90PRVMbsbo65HaHznGr/TwrK0QaFAJPPuU0i70IDyauFVM KHF/Y9hygq32O3qgIkAoF1ONNIT86auFrCdpM/0bwDBDDBcxnoCtjh9AOT2T07hiM5bE Sjhw== X-Gm-Message-State: AOJu0Yyn99ydUOMnIsZXxTXnKMpQPrOUhdnvC3zbEQaXPK79WWsJckVD ZfnKdohONFFCFGxFGJswvfjHoYXkmbIszoMeDe4= X-Received: by 2002:a17:907:2ce7:b0:9a1:bb8f:17d7 with SMTP id hz7-20020a1709072ce700b009a1bb8f17d7mr463648ejc.12.1693522600451; Thu, 31 Aug 2023 15:56:40 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id s13-20020a1709064d8d00b0099bca8b9a31sm1240738eju.100.2023.08.31.15.56.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:56:40 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Markus Armbruster Cc: qemu-arm@nongnu.org, qemu-block@nongnu.org, David Gibson , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Peter Maydell Subject: [PATCH 05/11] hw/arm/virt: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:56:00 +0200 Message-ID: <20230831225607.30829-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230831225607.30829-1-philmd@linaro.org> References: <20230831225607.30829-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=philmd@linaro.org; helo=mail-ej1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Fix: hw/arm/virt.c:821:22: error: declaration shadows a local variable [-Werror,-Wshadow] qemu_irq irq = qdev_get_gpio_in(vms->gic, ^ hw/arm/virt.c:803:13: note: previous declaration is here int irq; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- hw/arm/virt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a13c658bbf..32a964b572 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -800,7 +800,6 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem) for (i = 0; i < smp_cpus; i++) { DeviceState *cpudev = DEVICE(qemu_get_cpu(i)); int ppibase = NUM_IRQS + i * GIC_INTERNAL + GIC_NR_SGIS; - int irq; /* Mapping from the output timer irq lines from the CPU to the * GIC PPI inputs we use for the virt board. */ @@ -811,7 +810,7 @@ static void create_gic(VirtMachineState *vms, MemoryRegion *mem) [GTIMER_SEC] = ARCH_TIMER_S_EL1_IRQ, }; - for (irq = 0; irq < ARRAY_SIZE(timer_irq); irq++) { + for (unsigned irq = 0; irq < ARRAY_SIZE(timer_irq); irq++) { qdev_connect_gpio_out(cpudev, irq, qdev_get_gpio_in(vms->gic, ppibase + timer_irq[irq]));