From: "Michael S. Tsirkin" <mst@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: "Anthony Liguori" <aliguori@us.ibm.com>,
qemu-devel@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Andreas Färber" <afaerber@suse.de>
Subject: Re: [Qemu-devel] [pci PATCH v2 6/6] pc_piix: Kill pc_init1() memory region args
Date: Wed, 21 Aug 2013 23:31:15 +0300 [thread overview]
Message-ID: <20130821203115.GB15146@redhat.com> (raw)
In-Reply-To: <1377108885-2057-7-git-send-email-ehabkost@redhat.com>
On Wed, Aug 21, 2013 at 03:14:45PM -0300, Eduardo Habkost wrote:
> All callers always use the same values (get_system_memory(),
> get_system_io()), so the parameters are pointless.
>
> If one day we decide to eliminate get_system_memory() and
> get_system_io(), we will be able to do that more easily by adding the
> values to struct QEMUMachineInitArgs.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Paolo, could you ack this patch please?
It's on my tree but I can always revert ... :)
> ---
> hw/i386/pc_piix.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index d3d4893..3c36a2a 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -62,11 +62,11 @@ static bool has_pci_info = true;
>
> /* PC hardware initialisation */
> static void pc_init1(QEMUMachineInitArgs *args,
> - MemoryRegion *system_memory,
> - MemoryRegion *system_io,
> int pci_enabled,
> int kvmclock_enabled)
> {
> + MemoryRegion *system_memory = get_system_memory();
> + MemoryRegion *system_io = get_system_io();
> int i;
> ram_addr_t below_4g_mem_size, above_4g_mem_size;
> PCIBus *pci_bus;
> @@ -233,7 +233,7 @@ static void pc_init1(QEMUMachineInitArgs *args,
>
> static void pc_init_pci(QEMUMachineInitArgs *args)
> {
> - pc_init1(args, get_system_memory(), get_system_io(), 1, 1);
> + pc_init1(args, 1, 1);
> }
>
> static void pc_compat_1_6(QEMUMachineInitArgs *args)
> @@ -306,7 +306,7 @@ static void pc_init_pci_no_kvmclock(QEMUMachineInitArgs *args)
> has_pci_info = false;
> disable_kvm_pv_eoi();
> enable_compat_apic_id_mode();
> - pc_init1(args, get_system_memory(), get_system_io(), 1, 0);
> + pc_init1(args, 1, 0);
> }
>
> static void pc_init_isa(QEMUMachineInitArgs *args)
> @@ -317,7 +317,7 @@ static void pc_init_isa(QEMUMachineInitArgs *args)
> }
> disable_kvm_pv_eoi();
> enable_compat_apic_id_mode();
> - pc_init1(args, get_system_memory(), get_system_io(), 0, 1);
> + pc_init1(args, 0, 1);
> }
>
> #ifdef CONFIG_XEN
> --
> 1.8.3.1
next prev parent reply other threads:[~2013-08-21 20:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 18:14 [Qemu-devel] [pci PATCH v2 0/6] pc init & compat function cleanup Eduardo Habkost
2013-08-21 18:14 ` [Qemu-devel] [pci PATCH v2 1/6] pc: Don't prematurely explode QEMUMachineInitArgs Eduardo Habkost
2013-08-21 18:14 ` [Qemu-devel] [pci PATCH v2 2/6] pc: Don't explode QEMUMachineInitArgs into local variables needlessly Eduardo Habkost
2013-08-21 18:14 ` [Qemu-devel] [pci PATCH v2 3/6] pc: Kill pc_init_pci_1_0() Eduardo Habkost
2013-08-21 18:14 ` [Qemu-devel] [pci PATCH v2 4/6] pc: Create pc_compat_*() functions Eduardo Habkost
2013-08-21 18:14 ` [Qemu-devel] [pci PATCH v2 5/6] pc: pc_compat_1_4() now can call pc_compat_1_5() Eduardo Habkost
2013-08-21 18:14 ` [Qemu-devel] [pci PATCH v2 6/6] pc_piix: Kill pc_init1() memory region args Eduardo Habkost
2013-08-21 20:31 ` Michael S. Tsirkin [this message]
2013-08-21 20:30 ` [Qemu-devel] [pci PATCH v2 0/6] pc init & compat function cleanup Michael S. Tsirkin
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=20130821203115.GB15146@redhat.com \
--to=mst@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).