From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3DZN-0001wQ-Id for qemu-devel@nongnu.org; Fri, 04 Jul 2014 20:11:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X3DZI-0005B1-Kx for qemu-devel@nongnu.org; Fri, 04 Jul 2014 20:11:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21189) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X3DZI-0005Au-BP for qemu-devel@nongnu.org; Fri, 04 Jul 2014 20:11:04 -0400 From: Eduardo Habkost Date: Fri, 4 Jul 2014 21:09:39 -0300 Message-Id: <1404519002-10224-13-git-send-email-ehabkost@redhat.com> In-Reply-To: <1404519002-10224-1-git-send-email-ehabkost@redhat.com> References: <1404519002-10224-1-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [RFC v3 12/35] pc: Eliminate pc_common_machine_options() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , "Michael S. Tsirkin" , Alexander Graf , Don Slutz , Igor Mammedov , =?UTF-8?q?Andreas=20F=C3=A4rber?= The TYPE_PC_MACHINE parent class can initialize the common options for all PC machines. Reviewed-by: Andreas F=C3=A4rber Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 1 + hw/i386/pc_piix.c | 2 -- include/hw/i386/pc.h | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 1fd8ec1..d812ab7 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1663,6 +1663,7 @@ static void pc_machine_class_init(ObjectClass *oc, = void *data) =20 pcmc->get_hotplug_handler =3D mc->get_hotplug_handler; mc->get_hotplug_handler =3D pc_get_hotpug_handler; + mc->default_boot_order =3D "cad"; hc->plug =3D pc_machine_device_plug_cb; } =20 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 247fc17..16c948a 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -994,7 +994,6 @@ static void isapc_machine_class_init(ObjectClass *oc,= void *data) static GlobalProperty compat_props[] =3D { { /* end of list */ } }; - pc_common_machine_options(mc); mc->desc =3D "ISA-only PC"; mc->init =3D pc_init_isa; mc->max_cpus =3D 1; @@ -1023,7 +1022,6 @@ static void xenfv_machine_class_init(ObjectClass *o= c, void *data) }, { /* end of list */ } }; - pc_common_machine_options(mc); mc->desc =3D "Xen Fully-virtualized PC"; mc->init =3D pc_xen_hvm_init; mc->max_cpus =3D HVM_MAX_VCPUS; diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 7459778..5d5d193 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -500,14 +500,8 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint6= 4_t *); .value =3D stringify(0),\ } =20 -static inline void pc_common_machine_options(MachineClass *mc) -{ - mc->default_boot_order =3D "cad"; -} - static inline void pc_default_machine_options(MachineClass *mc) { - pc_common_machine_options(mc); mc->hot_add_cpu =3D pc_hot_add_cpu; mc->max_cpus =3D 255; } --=20 1.9.3