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