From patchwork Mon Jun 1 12:23:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 478948 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3670A140F99 for ; Mon, 1 Jun 2015 22:33:16 +1000 (AEST) Received: from localhost ([::1]:51965 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzOu2-0006Wm-9L for incoming@patchwork.ozlabs.org; Mon, 01 Jun 2015 08:33:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzOkn-00076t-Mc for qemu-devel@nongnu.org; Mon, 01 Jun 2015 08:23:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzOkm-0007Zf-9f for qemu-devel@nongnu.org; Mon, 01 Jun 2015 08:23:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzOkm-0007ZW-2H for qemu-devel@nongnu.org; Mon, 01 Jun 2015 08:23:40 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id B97A22D8B61; Mon, 1 Jun 2015 12:23:39 +0000 (UTC) Received: from redhat.com (ovpn-116-67.ams2.redhat.com [10.36.116.67]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t51CNbmI020154; Mon, 1 Jun 2015 08:23:38 -0400 Date: Mon, 1 Jun 2015 14:23:37 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1433161230-29421-24-git-send-email-mst@redhat.com> References: <1433161230-29421-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1433161230-29421-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , Eduardo Habkost , Paolo Bonzini Subject: [Qemu-devel] [PULL v2 23/60] machine: Remove unused fields from QEMUMachine X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Eduardo Habkost This removes the following fields from QEMUMachine: family, alias, reset, hot_add_cpu, units_per_default_bus, no_serial, no_parallel, use_virtcon, use_sclp, no_floppy, no_cdrom, default_display, compat_props, and hw_version. The only users of those fields were already converted to use QOM and MachineClass directly, so they are not needed anymore. Signed-off-by: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/boards.h | 15 +-------------- vl.c | 15 --------------- 2 files changed, 1 insertion(+), 29 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 1f11881..ff79797 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -19,31 +19,18 @@ typedef void QEMUMachineHotAddCPUFunc(const int64_t id, Error **errp); typedef int QEMUMachineGetKvmtypeFunc(const char *arg); struct QEMUMachine { - const char *family; /* NULL iff @name identifies a standalone machtype */ const char *name; - const char *alias; const char *desc; QEMUMachineInitFunc *init; - QEMUMachineResetFunc *reset; - QEMUMachineHotAddCPUFunc *hot_add_cpu; QEMUMachineGetKvmtypeFunc *kvm_type; BlockInterfaceType block_default_type; - int units_per_default_bus; int max_cpus; - unsigned int no_serial:1, - no_parallel:1, - use_virtcon:1, - use_sclp:1, - no_floppy:1, - no_cdrom:1, + unsigned int no_sdcard:1, has_dynamic_sysbus:1; int is_default; const char *default_machine_opts; const char *default_boot_order; - const char *default_display; - GlobalProperty *compat_props; - const char *hw_version; }; void memory_region_allocate_system_memory(MemoryRegion *mr, Object *owner, diff --git a/vl.c b/vl.c index 26b1e7e..1d4c089 100644 --- a/vl.c +++ b/vl.c @@ -1314,32 +1314,17 @@ static void machine_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); QEMUMachine *qm = data; - - mc->family = qm->family; mc->name = qm->name; - mc->alias = qm->alias; mc->desc = qm->desc; mc->init = qm->init; - mc->reset = qm->reset; - mc->hot_add_cpu = qm->hot_add_cpu; mc->kvm_type = qm->kvm_type; mc->block_default_type = qm->block_default_type; - mc->units_per_default_bus = qm->units_per_default_bus; mc->max_cpus = qm->max_cpus; - mc->no_serial = qm->no_serial; - mc->no_parallel = qm->no_parallel; - mc->use_virtcon = qm->use_virtcon; - mc->use_sclp = qm->use_sclp; - mc->no_floppy = qm->no_floppy; - mc->no_cdrom = qm->no_cdrom; mc->no_sdcard = qm->no_sdcard; mc->has_dynamic_sysbus = qm->has_dynamic_sysbus; mc->is_default = qm->is_default; mc->default_machine_opts = qm->default_machine_opts; mc->default_boot_order = qm->default_boot_order; - mc->default_display = qm->default_display; - mc->compat_props = qm->compat_props; - mc->hw_version = qm->hw_version; } int qemu_register_machine(QEMUMachine *m)