From patchwork Mon Oct 9 09:47:44 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: 730973 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1116288wrw; Mon, 9 Oct 2023 02:51:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBJJuGreCn3Q9/ZOQYBF8o6v5ZZMhNveCV2ccOpY1vs7J2TifBuTnz1QODSt9pu3lR+p7y X-Received: by 2002:a05:6870:b60e:b0:1dd:7fa9:ed67 with SMTP id cm14-20020a056870b60e00b001dd7fa9ed67mr17583939oab.24.1696845085167; Mon, 09 Oct 2023 02:51:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696845085; cv=none; d=google.com; s=arc-20160816; b=oo3+tgB+1xPtifEOAkxSxQSgR4lMqKQaDeAVz+7q50PVUJBncuCyDBOwIlwk6Fz81F FZVuThiO5qctTiGOaa0SohseGRSZF46cIGoeY+bwLhO7E3x28nJTKwQ7s/rbzOQJOClI zebg6A2JjBxYSlT4LE1f1EWdriCIzhxhPMm4m5GdE+gO6DR4Sg9dSwqINIDZZBFXb8V5 LM/fnBmK83ZegA3V9UPNGULAOr0tqGuGSIuW1Wq2sLQ0pR6rk/0N+zGp3byxbY+PT6PS XNEORIOkookYPagD3mSIs98UxxEe+yAZs+QXGJQJjBbNF83wsKpwyM/OOG2g1Eyrv/ES b9Ng== 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=BEGlN++LvrChCTNtyzB8Otj+nJkZt0M6Hyp5n7KviH8=; fh=n4SzPhYKXn8xRxTgdSQ5YZq0XW28GvXJqV224ul7a6o=; b=A5wvIxKZ3BNFtwxVDwkCtrc8v2WoXvG0txQioMh+EzMsjnzpZP/uUwoYj6OnIRPcB2 OSsiv/VC9JXy0EsJaW/4S4HHajbLO7xEJWj6MM0h5QptEpBRwP/yLjlfLgjwA/SCLwl5 W+0DNR53xsdaKNIo3ZIZ4QrF2uFv80+IgZ/uewq5T2ZzKbGzzjY7VJyXn5HKQ7cSfwFo S7/nstuLN1JFnGYVf3euBe4nUtNjDWHjt71GKWA4LBdKWMdny6eLvEJ2Uiewt++N3UY3 qNC6XbRbKm36QiwRpvcftyf8AdUF9wq1o9LHEHL2+8uJz6ZXdzRsFbUUXv3SE4nlXfWM VeRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RShyQl0v; 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 t10-20020a0ca68a000000b0065afd35c75dsi5766372qva.70.2023.10.09.02.51.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2023 02:51:25 -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=RShyQl0v; 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 1qpmtI-0003t1-E6; Mon, 09 Oct 2023 05:49:33 -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 1qpms8-0001xw-Qa for qemu-devel@nongnu.org; Mon, 09 Oct 2023 05:48:26 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpms6-0005z9-7d for qemu-devel@nongnu.org; Mon, 09 Oct 2023 05:48:20 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-53627feca49so7161460a12.1 for ; Mon, 09 Oct 2023 02:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696844896; x=1697449696; 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=BEGlN++LvrChCTNtyzB8Otj+nJkZt0M6Hyp5n7KviH8=; b=RShyQl0vPAPDG4mkiGyyGcC/uLFSknFmIiwrFXN2doJJtSmsQSlQXJjTO4xbp/JShI cHQdMs47IvZq8dOZz3iT4sI3HjLQroX+rPhVIaVg+aBxgP2LNCy7uCIe2mswWdTwb+qH YCxPBG1prWu+fxj8NCDe1ce3sSBADo7zSAU0h58LNHiF0pmIr5+Nm3WEcwSAWm0z53KU /R/PCuaHQxe089pNWgTSVFxiHgGuHu8yFEq5ZLluSLBrJVJn73O2PLcUHZg/vS+22q8L n5T2xhd5xYjg3enfMVFC59X9nVvAwvFNQWfn8DDUyuoLW9sCM8HsTZgG+uS0N5Z2rmlf 9OlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696844896; x=1697449696; 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=BEGlN++LvrChCTNtyzB8Otj+nJkZt0M6Hyp5n7KviH8=; b=QJSwDQ+zJ38gdJHXv2OF3fPGsCPPZ9J18N3JiGqSRBUCPF+H1G/ro1F7BSBvuv7A/2 FlH+4gilF74Kxy3E1E+2h3q5rHt44CeGjjFzpDRZAxY7YzZJOAsxlk+3/j6w41XLBdOC cbOnHRqefSazm+DihMKS17Txv46yPZlFA1PfCincJZ8OEyzZgmHCNB6ufiDpPH9S5Tw8 4a+g9SYejASMR5ezDfmJ6Hub7Ki7plqSBWnygu3Ok/bj5BfjttTIJf9M/NesjMNe6T1C HVrvVhePzSaR+xnHbtFu+H0yh6Qq6XUHiC19BjrD4r0jAn5Y1WHCHucihG0fFYy4c1WD N+gg== X-Gm-Message-State: AOJu0YzO+b+YRATxqoQCM5eEuiQ17CgCpIkvIFrxGxdfEBK+EfMXgpuw XrxcrGPPcrqqRwM0LCkW/b77gy7Q1QH4jjthMvk= X-Received: by 2002:a05:6402:351:b0:532:e4d3:df83 with SMTP id r17-20020a056402035100b00532e4d3df83mr12894895edw.4.1696844895949; Mon, 09 Oct 2023 02:48:15 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id bm15-20020a0564020b0f00b005346925a474sm5934082edb.43.2023.10.09.02.48.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 02:48:15 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Christian Borntraeger , qemu-s390x@nongnu.org, Paolo Bonzini , Ani Sinha , "Michael S. Tsirkin" , Igor Mammedov , Yanan Wang , David Hildenbrand , Eric Farman , Richard Henderson , Markus Armbruster , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Marcel Apfelbaum , Thomas Huth , Halil Pasic , Gerd Hoffmann , Ilya Leoshkevich Subject: [PATCH 4/6] hw/acpi/pcihp: Clean up global variable shadowing in acpi_pcihp_init() Date: Mon, 9 Oct 2023 11:47:44 +0200 Message-ID: <20231009094747.54240-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009094747.54240-1-philmd@linaro.org> References: <20231009094747.54240-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=philmd@linaro.org; helo=mail-ed1-x52a.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/acpi/pcihp.c:499:36: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] MemoryRegion *address_space_io, ^ include/exec/address-spaces.h:35:21: note: previous declaration is here extern AddressSpace address_space_io; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Ani Sinha Acked-by: Michael S. Tsirkin --- include/hw/acpi/pcihp.h | 2 +- hw/acpi/pcihp.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/include/hw/acpi/pcihp.h b/include/hw/acpi/pcihp.h index ef59810c17..ac21a95913 100644 --- a/include/hw/acpi/pcihp.h +++ b/include/hw/acpi/pcihp.h @@ -56,7 +56,7 @@ typedef struct AcpiPciHpState { } AcpiPciHpState; void acpi_pcihp_init(Object *owner, AcpiPciHpState *, PCIBus *root, - MemoryRegion *address_space_io, uint16_t io_base); + MemoryRegion *io, uint16_t io_base); bool acpi_pcihp_is_hotpluggbale_bus(AcpiPciHpState *s, BusState *bus); void acpi_pcihp_device_pre_plug_cb(HotplugHandler *hotplug_dev, diff --git a/hw/acpi/pcihp.c b/hw/acpi/pcihp.c index cdd6f775a1..4f75c873e2 100644 --- a/hw/acpi/pcihp.c +++ b/hw/acpi/pcihp.c @@ -496,8 +496,7 @@ static const MemoryRegionOps acpi_pcihp_io_ops = { }; void acpi_pcihp_init(Object *owner, AcpiPciHpState *s, PCIBus *root_bus, - MemoryRegion *address_space_io, - uint16_t io_base) + MemoryRegion *io, uint16_t io_base) { s->io_len = ACPI_PCIHP_SIZE; s->io_base = io_base; @@ -506,7 +505,7 @@ void acpi_pcihp_init(Object *owner, AcpiPciHpState *s, PCIBus *root_bus, memory_region_init_io(&s->io, owner, &acpi_pcihp_io_ops, s, "acpi-pci-hotplug", s->io_len); - memory_region_add_subregion(address_space_io, s->io_base, &s->io); + memory_region_add_subregion(io, s->io_base, &s->io); object_property_add_uint16_ptr(owner, ACPI_PCIHP_IO_BASE_PROP, &s->io_base, OBJ_PROP_FLAG_READ);