From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5xeU-0008Es-JV for qemu-devel@nongnu.org; Mon, 07 Dec 2015 10:24:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a5xeQ-0004Pq-Mb for qemu-devel@nongnu.org; Mon, 07 Dec 2015 10:24:34 -0500 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]:37349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a5xeQ-0004Pg-G8 for qemu-devel@nongnu.org; Mon, 07 Dec 2015 10:24:30 -0500 Received: by wmww144 with SMTP id w144so154658981wmw.0 for ; Mon, 07 Dec 2015 07:24:30 -0800 (PST) References: <1449020831-8414-1-git-send-email-ehabkost@redhat.com> <1449020831-8414-5-git-send-email-ehabkost@redhat.com> From: Marcel Apfelbaum Message-ID: <5665A4AB.8020809@gmail.com> Date: Mon, 7 Dec 2015 17:24:27 +0200 MIME-Version: 1.0 In-Reply-To: <1449020831-8414-5-git-send-email-ehabkost@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 04/16] acpi: Make acpi_setup() get PCMachineState as argument Reply-To: marcel@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eduardo Habkost , qemu-devel@nongnu.org Cc: Igor Mammedov , "Michael S. Tsirkin" , Marcel Apfelbaum On 12/02/2015 03:46 AM, Eduardo Habkost wrote: > Lots of PcGuestInfo fields are duplicates of PCMachineClass or > PCMachineState fields. Pass PCMachineState as argument to > acpi_setup(), so we can simply let the ACPI code use those fields > directly. I completely agree with removing duplicated fields and using PCMachine fields directly, but this not what this patch does. It only extracts PcGuestInfo info from the machine. Thanks, Marcel > > Signed-off-by: Eduardo Habkost > --- > hw/i386/acpi-build.c | 3 ++- > hw/i386/acpi-build.h | 2 +- > hw/i386/pc.c | 2 +- > 3 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c > index bca3f06..74f0922 100644 > --- a/hw/i386/acpi-build.c > +++ b/hw/i386/acpi-build.c > @@ -1893,8 +1893,9 @@ static const VMStateDescription vmstate_acpi_build = { > }, > }; > > -void acpi_setup(PcGuestInfo *guest_info) > +void acpi_setup(PCMachineState *pcms) > { > + PcGuestInfo *guest_info = &pcms->acpi_guest_info; > AcpiBuildTables tables; > AcpiBuildState *build_state; > > diff --git a/hw/i386/acpi-build.h b/hw/i386/acpi-build.h > index e57b1aa..132aba2 100644 > --- a/hw/i386/acpi-build.h > +++ b/hw/i386/acpi-build.h > @@ -4,6 +4,6 @@ > > #include "qemu/typedefs.h" > > -void acpi_setup(PcGuestInfo *); > +void acpi_setup(PCMachineState *pcms); > > #endif > diff --git a/hw/i386/pc.c b/hw/i386/pc.c > index a17e5b3e..fc98a20 100644 > --- a/hw/i386/pc.c > +++ b/hw/i386/pc.c > @@ -1179,7 +1179,7 @@ void pc_machine_done(Notifier *notifier, void *data) > } > } > > - acpi_setup(&pcms->acpi_guest_info); > + acpi_setup(pcms); > } > > PcGuestInfo *pc_guest_info_init(PCMachineState *pcms) >