From: Dongli Zhang <dongli.zhang@oracle.com>
To: qemu-trivial@nongnu.org, qemu-devel@nongnu.org
Cc: laurent@vivier.eu, mjt@tls.msk.ru, armbru@redhat.com
Subject: [Qemu-devel] [PATCH 1/1] qdev: rename qdev_create() argument to sync with qdev_try_create()
Date: Mon, 24 Dec 2018 14:35:23 +0800 [thread overview]
Message-ID: <1545633323-10818-1-git-send-email-dongli.zhang@oracle.com> (raw)
The second argument used by qdev_create() is typename and 'name' is very
confusing. Rename it from 'name' to 'type', which is the same used by
qdev_try_create().
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
hw/core/qdev.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 6b3cc55..1d65e8f 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -113,17 +113,17 @@ void qdev_set_parent_bus(DeviceState *dev, BusState *bus)
/* Create a new device. This only initializes the device state
structure and allows properties to be set. The device still needs
to be realized. See qdev-core.h. */
-DeviceState *qdev_create(BusState *bus, const char *name)
+DeviceState *qdev_create(BusState *bus, const char *type)
{
DeviceState *dev;
- dev = qdev_try_create(bus, name);
+ dev = qdev_try_create(bus, type);
if (!dev) {
if (bus) {
- error_report("Unknown device '%s' for bus '%s'", name,
+ error_report("Unknown device '%s' for bus '%s'", type,
object_get_typename(OBJECT(bus)));
} else {
- error_report("Unknown device '%s' for default sysbus", name);
+ error_report("Unknown device '%s' for default sysbus", type);
}
abort();
}
--
2.7.4
next reply other threads:[~2018-12-24 6:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-24 6:35 Dongli Zhang [this message]
2019-01-08 12:38 ` [Qemu-devel] [PATCH 1/1] qdev: rename qdev_create() argument to sync with qdev_try_create() Markus Armbruster
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=1545633323-10818-1-git-send-email-dongli.zhang@oracle.com \
--to=dongli.zhang@oracle.com \
--cc=armbru@redhat.com \
--cc=laurent@vivier.eu \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).