From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCF29-0005ha-5D for qemu-devel@nongnu.org; Wed, 21 Aug 2013 16:29:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VCF23-00073f-1v for qemu-devel@nongnu.org; Wed, 21 Aug 2013 16:29:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VCF22-00073Z-Pu for qemu-devel@nongnu.org; Wed, 21 Aug 2013 16:29:31 -0400 Date: Wed, 21 Aug 2013 23:31:15 +0300 From: "Michael S. Tsirkin" Message-ID: <20130821203115.GB15146@redhat.com> References: <1377108885-2057-1-git-send-email-ehabkost@redhat.com> <1377108885-2057-7-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1377108885-2057-7-git-send-email-ehabkost@redhat.com> Subject: Re: [Qemu-devel] [pci PATCH v2 6/6] pc_piix: Kill pc_init1() memory region args List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost Cc: Anthony Liguori , qemu-devel@nongnu.org, Markus Armbruster , Gerd Hoffmann , Paolo Bonzini , Igor Mammedov , Andreas =?iso-8859-1?Q?F=E4rber?= 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 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