From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRmGl-0007Dg-IK for qemu-devel@nongnu.org; Tue, 18 Aug 2015 15:10:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZRmGk-0005gi-Kl for qemu-devel@nongnu.org; Tue, 18 Aug 2015 15:09:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZRmGk-0005gZ-Fx for qemu-devel@nongnu.org; Tue, 18 Aug 2015 15:09:58 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 3C78F32B824 for ; Tue, 18 Aug 2015 19:09:58 +0000 (UTC) From: Eduardo Habkost Date: Tue, 18 Aug 2015 12:08:52 -0700 Message-Id: <1439924934-30491-6-git-send-email-ehabkost@redhat.com> In-Reply-To: <1439924934-30491-1-git-send-email-ehabkost@redhat.com> References: <1439924934-30491-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 5/7] pc: Use DEFINE_MACHINE to implement DEFINE_PC_MACHINE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , "Michael S. Tsirkin" DEFINE_PC_MACHINE should be eventually replaced by DEFINE_MACHINE, we just need to eliminate the pc_compat_*() functions first. Signed-off-by: Eduardo Habkost --- include/hw/i386/pc.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index d0cad87..dc22608 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -694,23 +694,12 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); }, #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \ - static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \ + static void pc_machine_##suffix##_class_init(MachineClass *mc) \ { \ - MachineClass *mc = MACHINE_CLASS(oc); \ optsfn(mc); \ - mc->name = namestr; \ mc->init = initfn; \ } \ - static const TypeInfo pc_machine_type_##suffix = { \ - .name = namestr TYPE_MACHINE_SUFFIX, \ - .parent = TYPE_PC_MACHINE, \ - .class_init = pc_machine_##suffix##_class_init, \ - }; \ - static void pc_machine_init_##suffix(void) \ - { \ - type_register(&pc_machine_type_##suffix); \ - } \ - machine_init(pc_machine_init_##suffix) + DEFINE_MACHINE(namestr, pc_machine_##suffix##_class_init) #define SET_MACHINE_COMPAT(m, COMPAT) do { \ static GlobalProperty props[] = { \ -- 2.1.0