qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Ani Sinha <anisinha@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Eduardo Habkost <eduardo@habkost.net>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	qemu-s390x@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Yanan Wang <wangyanan55@huawei.com>,
	David Hildenbrand <david@redhat.com>,
	Eric Farman <farman@linux.ibm.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Markus Armbruster <armbru@redhat.com>,
	Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Thomas Huth <thuth@redhat.com>, Halil Pasic <pasic@linux.ibm.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Ilya Leoshkevich <iii@linux.ibm.com>
Subject: Re: [PATCH 3/6] hw/display/vga: Clean up global variable shadowing
Date: Mon, 9 Oct 2023 17:43:25 +0200	[thread overview]
Message-ID: <b4074e1b-63b0-e37a-dfc6-688c7480cca5@linaro.org> (raw)
In-Reply-To: <333F6764-343E-428B-AB57-76542780083A@redhat.com>

On 9/10/23 16:11, Ani Sinha wrote:
> 
> 
>> On 09-Oct-2023, at 3:17 PM, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>>
>> Fix:
>>
>>   hw/display/vga.c:2307:29: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
>>                 MemoryRegion *address_space_io, bool init_vga_ports)
>>                             ^
>>   include/exec/address-spaces.h:35:21: note: previous declaration is here
>>   extern AddressSpace address_space_io;
>>                       ^
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>> hw/display/vga_int.h | 2 +-
>> hw/display/vga.c     | 6 +++---
>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
>> index 7cf0d11201..94949d8a0c 100644
>> --- a/hw/display/vga_int.h
>> +++ b/hw/display/vga_int.h
>> @@ -157,7 +157,7 @@ static inline int c6_to_8(int v)
>> }
>>
>> bool vga_common_init(VGACommonState *s, Object *obj, Error **errp);
>> -void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space,
>> +void vga_init(VGACommonState *s, Object *obj, MemoryRegion *io,
>>                MemoryRegion *address_space_io, bool init_vga_ports);
> 
> Ok here you are replacing *address_space with *io but …
> 
>> MemoryRegion *vga_init_io(VGACommonState *s, Object *obj,
>>                            const MemoryRegionPortio **vga_ports,
>> diff --git a/hw/display/vga.c b/hw/display/vga.c
>> index 37557c3442..bb4cd240ec 100644
>> --- a/hw/display/vga.c
>> +++ b/hw/display/vga.c
>> @@ -2304,7 +2304,7 @@ MemoryRegion *vga_init_io(VGACommonState *s, Object *obj,
>> }
>>
>> void vga_init(VGACommonState *s, Object *obj, MemoryRegion *address_space,
>> -              MemoryRegion *address_space_io, bool init_vga_ports)
>> +              MemoryRegion *io, bool init_vga_ports)
> 
> Here you replace *address_space_io with *io? This does not look right.

Yeah this is totally wrong, sorry...



  reply	other threads:[~2023-10-09 15:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09  9:47 [PATCH 0/6] hw: Clean up global variables shadowing Philippe Mathieu-Daudé
2023-10-09  9:47 ` [PATCH 1/6] hw/core/cpu: Clean up global variable shadowing Philippe Mathieu-Daudé
2023-10-09  9:47 ` [PATCH 2/6] hw/loader: Clean up global variable shadowing in rom_add_file() Philippe Mathieu-Daudé
2023-10-09 12:25   ` Ani Sinha
2023-10-09  9:47 ` [PATCH 3/6] hw/display/vga: Clean up global variable shadowing Philippe Mathieu-Daudé
2023-10-09 14:11   ` Ani Sinha
2023-10-09 15:43     ` Philippe Mathieu-Daudé [this message]
2023-10-09  9:47 ` [PATCH 4/6] hw/acpi/pcihp: Clean up global variable shadowing in acpi_pcihp_init() Philippe Mathieu-Daudé
2023-10-09 12:04   ` Ani Sinha
2023-10-09 16:22   ` Michael S. Tsirkin
2023-10-09  9:47 ` [PATCH 5/6] hw/pci: Clean up global variable shadowing of address_space_io variable Philippe Mathieu-Daudé
2023-10-09 16:22   ` Michael S. Tsirkin
2023-10-09  9:47 ` [PATCH 6/6] hw/s390x: Clean up global variable shadowing in quiesce_powerdown_req() Philippe Mathieu-Daudé
2023-10-09  9:51   ` Thomas Huth
2023-10-09  9:52   ` David Hildenbrand
2023-10-11 11:58   ` Eric Farman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4074e1b-63b0-e37a-dfc6-688c7480cca5@linaro.org \
    --to=philmd@linaro.org \
    --cc=anisinha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=farman@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=imammedo@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    --cc=wangyanan55@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).