From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M9dp7-0001Lb-Bm for qemu-devel@nongnu.org; Thu, 28 May 2009 07:31:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M9dp0-0001KB-Vx for qemu-devel@nongnu.org; Thu, 28 May 2009 07:30:59 -0400 Received: from [199.232.76.173] (port=50252 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M9dp0-0001K8-PW for qemu-devel@nongnu.org; Thu, 28 May 2009 07:30:54 -0400 Received: from mx2.redhat.com ([66.187.237.31]:33484) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M9dp0-0004T9-D1 for qemu-devel@nongnu.org; Thu, 28 May 2009 07:30:54 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4SBUrlx028163 for ; Thu, 28 May 2009 07:30:53 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4SBUrXj019838 for ; Thu, 28 May 2009 07:30:53 -0400 Received: from zweiblum.home.kraxel.org (vpn-10-220.str.redhat.com [10.32.10.220]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4SBUpOi015777 for ; Thu, 28 May 2009 07:30:52 -0400 Message-ID: <4A1E75EB.8060602@redhat.com> Date: Thu, 28 May 2009 13:30:51 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050305040204020805060202" Subject: [Qemu-devel] [PATCH] qdev: kill DeviceState->name List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org" This is a multi-part message in MIME format. --------------050305040204020805060202 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit ... it is redundant with DeviceState->type->name please apply, Gerd --------------050305040204020805060202 Content-Type: text/plain; name="0004-qdev-kill-DeviceState-name.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0004-qdev-kill-DeviceState-name.patch" >>From 320b8d821fe156ae057ab1dcedb8e8bf1ebf2275 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 27 May 2009 22:54:29 +0200 Subject: [PATCH 04/21] qdev: kill DeviceState->name is redundant with DeviceState->type->name Signed-off-by: Gerd Hoffmann --- hw/qdev.c | 3 +-- hw/qdev.h | 1 - 2 files changed, 1 insertions(+), 3 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index d945ff9..cedb772 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -84,7 +84,6 @@ DeviceState *qdev_create(BusState *bus, const char *name) } dev = qemu_mallocz(t->size); - dev->name = name; dev->type = t; if (!bus) { @@ -162,7 +161,7 @@ CharDriverState *qdev_init_chardev(DeviceState *dev) static int next_serial; static int next_virtconsole; /* FIXME: This is a nasty hack that needs to go away. */ - if (strncmp(dev->name, "virtio", 6) == 0) { + if (strncmp(dev->type->name, "virtio", 6) == 0) { return virtcon_hds[next_virtconsole++]; } else { return serial_hds[next_serial++]; diff --git a/hw/qdev.h b/hw/qdev.h index 143a1f8..b3cc3ec 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -13,7 +13,6 @@ typedef struct BusState BusState; /* This structure should not be accessed directly. We declare it here so that it can be embedded in individual device state structures. */ struct DeviceState { - const char *name; DeviceType *type; BusState *parent_bus; DeviceProperty *props; -- 1.6.2.2 --------------050305040204020805060202--