From patchwork Thu Aug 31 22:56:02 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: 719041 Delivered-To: patch@linaro.org Received: by 2002:adf:e5c2:0:b0:31d:da82:a3b4 with SMTP id a2csp741868wrn; Thu, 31 Aug 2023 15:58:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKPX9DtRnw6yFKL/coXGUFtPPJ9YTV4G8ZeKGJJRFOOr7G1TxFcarOZdyLPeCn/sVcypbj X-Received: by 2002:ac8:5cc3:0:b0:403:ef20:5142 with SMTP id s3-20020ac85cc3000000b00403ef205142mr1052463qta.40.1693522735138; Thu, 31 Aug 2023 15:58:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693522735; cv=none; d=google.com; s=arc-20160816; b=n8FfWZFtgbj28aD0g3J0B5oI7CKgvxvZtuTN99NIY9LCac63d68uvlm+SwCYviRHZU DP53pBVRaaShhrazRp1itm0VxDmKaHppez8kWZrN/EHGYH1uw0YtrfNF3CvX37Krqriy HiqgwxU9Rwr6JpOBEGRCrFgU1/EFkcaev6G/2+RvN51LwFFj5b5lj6R1QUjpQrR3xqQm hUBxJXEIT32kNx5+JxpiWrNO7qaUWfTnQWTX2tXqObQaYHC3hY0IJjSQ5cLklR2INtm5 +YErPL3R4W5kQJ8BWH2TREvA3g2FEFblvhWUewYdfBEl/d8y5B+yOEwBNLT+6zo4Etez jByQ== 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=C//OKonAhBTdAA31WeZt4HEKfoMaq1ExT5IohWC+GEE=; fh=2dzFdWmoFMcRjG6X94z+TNmTpRmzCgbzYz+l0MFcCao=; b=0mCxy5tnS5VhVdXyqaiGHDQ0EscF8sQe2MHt/zUfcb9YE//y+fHG+rPAETT2rb5OND oVlb10b+aedULN7owOT65FWkJ5YoClVUKUOf4pqSUrwL7AttJdoiZMOUlwYuVFRD3Owd Nfo6JL/9yBAP8OtEDCzbu2GKruG2w9eRzx6wiF1ke2L5EA3wJirGvpL4JBrumnJ9Vkel MgP+PozsG9kJ7H7qiLRiqd8wHDlxUjo+ZBXbgJ9nddjvjjGIdQfHcTtxpu0Fxt3xjd7i i5grm2owl2+Dcu4RRqYA4pDFVMLsNJXo5W/udKL0eoIcSlKYDq60uXpNg/arNfxhNeYB LabQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZycqYeTq; 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 o4-20020a05622a008400b004009b446cd7si1479800qtw.258.2023.08.31.15.58.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Aug 2023 15:58:55 -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=ZycqYeTq; 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 1qbqaz-0004Gw-F2; Thu, 31 Aug 2023 18:57:01 -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 1qbqav-0004AM-PB for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:58 -0400 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbqar-00030b-SX for qemu-devel@nongnu.org; Thu, 31 Aug 2023 18:56:57 -0400 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-31c5a2e8501so1127898f8f.0 for ; Thu, 31 Aug 2023 15:56:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693522612; x=1694127412; 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=C//OKonAhBTdAA31WeZt4HEKfoMaq1ExT5IohWC+GEE=; b=ZycqYeTqToEPoiQHOVNKnceVyOBEVaynFCechXy+p2eraxH3cKL91PfxRb4CABXGA3 /mTjWwghNxCk7Bi5GJAwvuoOcSUJu+3nQAvogD1KUdjEFL5FimMTHVpEBftMjyE8c/Um q/MZ1w+x5f7NNmjb/V/klkYgRJ3LJerJX+7ysJ27Nyph9PTRv5kt3DcA2nnYVc9lSOAK lgqpCDM4PYDFZQjQvAOj9LgIIyOqZCp2F6xNAuKo5BnkEA4F77Jk0gPxgBQI+7VD72gy j7SqZYK1++1t75rTZTrptC3QcoQE4xPERgxy4a+tHsFaytbQTtHIQONHBy+zs/m1/0rA B1tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693522612; x=1694127412; 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=C//OKonAhBTdAA31WeZt4HEKfoMaq1ExT5IohWC+GEE=; b=B/xlwJk7FoW0eBrN6dk2S29dSb8VEjry49qIjMZBg6ElPfz2m9CyXlSQFCeqpXn01m 1Bmii4L2iCCdQQRLqfDdDxl9MPIklzSIoFqwzf/2+Hyrqjz7QA3t/Ruee5MV6F8JEve6 oEcYiqfsyHp5r9HiS6KVd/gWq0GyTzCBuQjuX7lloNSpUpWCB7Owmty8l/kn+k/+wZcZ ZXoiGsAirU7d2btK9Bf2nMvy+aFw8DH3vAmWGMaIKff1jbXJCTEYDp8wG5r/TGcniHI5 zC0raS3ovFN7YgvOWc8BA9rocfKI9bC9KhEG+DTwRsESSo51BkA55nyxRu9/QfU+Cq0r IVTA== X-Gm-Message-State: AOJu0YzTZ8MQ4F7PnRsTWj7grsn2XkNFvaiIn+N77KceUNRFQc0kMKdY A0S/AH5LSwfJiS3YSYF82ASlOu9NCngEXxXoHx4= X-Received: by 2002:a5d:4388:0:b0:31a:d6cf:7709 with SMTP id i8-20020a5d4388000000b0031ad6cf7709mr718311wrq.22.1693522612215; Thu, 31 Aug 2023 15:56:52 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.245]) by smtp.gmail.com with ESMTPSA id d3-20020aa7d5c3000000b005232ea6a330sm1345355eds.2.2023.08.31.15.56.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 31 Aug 2023 15:56:51 -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?= , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Peter Maydell , Andrew Jeffery , Joel Stanley Subject: [PATCH 07/11] hw/arm/aspeed: Clean up local variable shadowing Date: Fri, 1 Sep 2023 00:56:02 +0200 Message-ID: <20230831225607.30829-8-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::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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/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);