Received: from eggs.gnu.org ([2001:4830:134:3::10]:38619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XI0fs-0001El-Qa for qemu-devel@nongnu.org; Thu, 14 Aug 2014 15:27:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XI0fn-0006c6-SJ for qemu-devel@nongnu.org; Thu, 14 Aug 2014 15:27:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:29120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XI0fn-0006bs-K0 for qemu-devel@nongnu.org; Thu, 14 Aug 2014 15:26:55 -0400 From: Eduardo Habkost Date: Thu, 14 Aug 2014 16:25:41 -0300 Message-Id: <1408044362-11621-13-git-send-email-ehabkost@redhat.com> In-Reply-To: <1408044362-11621-1-git-send-email-ehabkost@redhat.com> References: <1408044362-11621-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] [PATCH v4 12/33] 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 e56716f..f61eade 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1688,6 +1688,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 a2ff925..4bc2d8b 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -1014,7 +1014,6 @@ static void isapc_machine_class_init(ObjectClass *o= c, 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; @@ -1043,7 +1042,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 46bbf48..b3dd3ed 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -506,14 +506,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