From: Gerd Hoffmann <kraxel@redhat.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] qdev: kill DeviceState->name
Date: Thu, 28 May 2009 13:30:51 +0200 [thread overview]
Message-ID: <4A1E75EB.8060602@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 72 bytes --]
... it is redundant with DeviceState->type->name
please apply,
Gerd
[-- Attachment #2: 0004-qdev-kill-DeviceState-name.patch --]
[-- Type: text/plain, Size: 1510 bytes --]
>From 320b8d821fe156ae057ab1dcedb8e8bf1ebf2275 Mon Sep 17 00:00:00 2001
From: Gerd Hoffmann <kraxel@redhat.com>
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 <kraxel@redhat.com>
---
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
reply other threads:[~2009-05-28 11:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A1E75EB.8060602@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).