From patchwork Tue Oct 10 11:50:46 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: 731451 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1701501wrw; Tue, 10 Oct 2023 04:51:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGsi5bSLo7MLPqKW815uS+545/OFB0Q92k4suJXPCxgLYag+XhiuS8PjVWx60savkKnbhvj X-Received: by 2002:a25:dbc4:0:b0:d7e:8642:f0b0 with SMTP id g187-20020a25dbc4000000b00d7e8642f0b0mr17926879ybf.3.1696938710796; Tue, 10 Oct 2023 04:51:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696938710; cv=none; d=google.com; s=arc-20160816; b=G0RoRLQfW1cPg+juSnyl4u/qAEw6ZI2cmJYnPd3UMPnaZuVi0SqtYuOgeuQ2vTVyE7 kkbHuOxzABGj1dQsDXsFHkEUIzlBQsU4zkcwiZgkvEl7TmqZ8VnoQdnxdwozohsRPJbm 7qVQUZaFWcKe2OJjx1MqkMAr+96moDNQ4a59MS1MYBA64RqFNieJI3fNXPm4+Gc/oJq6 Un57e4t5rS9nLTqBFDej9iMo/YEahWSiPG9/k/7x6p9Wuh8zcJ5O+ajRalxnKGuT/HNi 8tvPByp8qOqr96Hvy4hsS5fbnRHOcR+kkrJjqrWxJyHB2T9mxKshSzZe5+FT0wSSwSgx YzPA== 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=DLUjh+Qx8MrulfYzvPkIHnb5yPwNt/v/tfPLH7EDgjM=; fh=06c1SfXCDJsZD94qIZFbVOXNxhn2+zM3SMxozUzqBSg=; b=wKm+ihSiBcq+XmVaIErZPZ9X2pvg+a76/lsvV8X6vsfgDvEgQ0PW4AQ/HvYeCuyGzE DMCzq4khplPLqR6k2UYcu3JCvlvcDuEfafqka9KJmvQAlM/vgnvA4c6MSj6ogVZScAWo Zx/e2IP8lemoASZ6DJRIS9aQcQetZEVoXFrJM5u3YJcfqkHwLHQsaSWsvLWbS/fEdezE 6f817AYyGdPKjWounf4GlqxZNLqlNJLD4RyxlkNLMrQUrtB9t7XrR1ySMFZ8d8+wxWWD Ez4pVhoTFKWFWQS88jK/D0HFHCk7e68MvV1sRJvslVdIIqXrqcCE6VJ3lFzxZsaq3qUl dHDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pi4zl7Vi; 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 w5-20020a05620a424500b0077701e9f740si4989611qko.775.2023.10.10.04.51.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Oct 2023 04:51:50 -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=Pi4zl7Vi; 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 1qqBGn-00082Z-3W; Tue, 10 Oct 2023 07: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 1qqBGl-0007zi-5n for qemu-devel@nongnu.org; Tue, 10 Oct 2023 07:51:23 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqBGh-000756-4g for qemu-devel@nongnu.org; Tue, 10 Oct 2023 07:51:22 -0400 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-53b32dca0bfso8546489a12.0 for ; Tue, 10 Oct 2023 04:51:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696938677; x=1697543477; 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=DLUjh+Qx8MrulfYzvPkIHnb5yPwNt/v/tfPLH7EDgjM=; b=Pi4zl7ViF5ITYdQXmFBTH5LGteyeQUIObBvcIqV6ONYgkIYK1JEbcMw9RE9Umbcq9x o8G+iQMshstxTfgXRGRmuWv8J1NSAstKHpL4k0e5nEBWG2Xq17P5HXMaO1um2+XZeJGg 5mG+S8sM7ioNM3A/nWf0kI0aiJxL8JCalo1vA8Jk6k+5pq/UI3kLzkU+nebjpj2SHXsX P1vR3B8TSfY1q58X8sDOfhCAXzMzJLtygD/etTlxlQM4d9ogRo1bz+Y6dVq5Ofs8POOj tB1dzrO02CRw/C6IouVM46pS5CMnqjIvawhf5UqpldmxsyfG9sMfK5r0KEWU4FfVdaZ4 b8QQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696938677; x=1697543477; 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=DLUjh+Qx8MrulfYzvPkIHnb5yPwNt/v/tfPLH7EDgjM=; b=WYqDbLGrkQYNcaEHGeew6/TnT8XRphOLKcaGw7/3Q30G9oy6w6CYX1sxZVysFNe1oK ai4tAN/oTBjdpZAHATcatXac13/ekULs1zeG3+d8COZfK1OJg9BvQ/Ls/z1/gU7DIgZE XQu2kfv5FLshvwARFxEr+SBB5yyGofontfsPqnsX4FQbXAmH3pVZSxXoQP+xzGxXGa31 c4iEpSFcp6UPxN5ZyXtsuXxuYDQNCC1vA58pWphhwTWLBMaP3fYIRtP6OxjhJyL78Q7c j/GjZhJXf92u5tdG0hd8+toAGzXlwxYCEZ5OXjNVJkW4kd4cLtqVjhowjz1JO6jD7wE9 hqKA== X-Gm-Message-State: AOJu0YwOTRb4vpTlTOrTtQfPObSOBTFP9Wo+lra6bPdBHlo7L/qLayS1 7RAJ+j9D36RT1SoQKBOwxC/Aie9nOyF+MI3DOqHY3w== X-Received: by 2002:aa7:dcc7:0:b0:522:b876:9ef5 with SMTP id w7-20020aa7dcc7000000b00522b8769ef5mr14362256edu.8.1696938677099; Tue, 10 Oct 2023 04:51:17 -0700 (PDT) Received: from m1x-phil.lan (aif79-h01-176-172-113-148.dsl.sta.abo.bbox.fr. [176.172.113.148]) by smtp.gmail.com with ESMTPSA id bf14-20020a0564021a4e00b005362bcc089csm7382182edb.67.2023.10.10.04.51.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Oct 2023 04:51:16 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Markus Armbruster , Igor Mammedov , Richard Henderson , Ilya Leoshkevich , Gerd Hoffmann , Halil Pasic , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?q?aud=C3=A9?= , "Michael S. Tsirkin" , Yanan Wang , Eduardo Habkost , Eric Farman , qemu-s390x@nongnu.org, Christian Borntraeger , Thomas Huth , Ani Sinha , David Hildenbrand Subject: [PATCH v2 4/6] hw/acpi/pcihp: Clean up global variable shadowing in acpi_pcihp_init() Date: Tue, 10 Oct 2023 13:50:46 +0200 Message-ID: <20231010115048.11856-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231010115048.11856-1-philmd@linaro.org> References: <20231010115048.11856-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.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);