From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: Laurent Vivier <lvivier@redhat.com>, Fam Zheng <famz@redhat.com>,
Kevin Wolf <kwolf@redhat.com>, Max Reitz <mreitz@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
"open list:NVMe Block Driver" <qemu-block@nongnu.org>
Subject: [Qemu-devel] [PULL 05/14] qdict: remove useless cast
Date: Tue, 27 Mar 2018 09:30:05 -0500 [thread overview]
Message-ID: <20180327143014.1767669-6-eblake@redhat.com> (raw)
In-Reply-To: <20180327143014.1767669-1-eblake@redhat.com>
From: Laurent Vivier <lvivier@redhat.com>
Re-run Coccinelle script scripts/coccinelle/qobject.cocci
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20180323143202.28879-5-lvivier@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
---
block/nvme.c | 11 +++++------
monitor.c | 2 +-
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index 8bca57aae69..c4f3a7bc94a 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -695,12 +695,11 @@ static void nvme_parse_filename(const char *filename, QDict *options,
unsigned long ns;
const char *slash = strchr(tmp, '/');
if (!slash) {
- qdict_put(options, NVME_BLOCK_OPT_DEVICE,
- qstring_from_str(tmp));
+ qdict_put_str(options, NVME_BLOCK_OPT_DEVICE, tmp);
return;
}
device = g_strndup(tmp, slash - tmp);
- qdict_put(options, NVME_BLOCK_OPT_DEVICE, qstring_from_str(device));
+ qdict_put_str(options, NVME_BLOCK_OPT_DEVICE, device);
g_free(device);
namespace = slash + 1;
if (*namespace && qemu_strtoul(namespace, NULL, 10, &ns)) {
@@ -708,8 +707,8 @@ static void nvme_parse_filename(const char *filename, QDict *options,
namespace);
return;
}
- qdict_put(options, NVME_BLOCK_OPT_NAMESPACE,
- qstring_from_str(*namespace ? namespace : "1"));
+ qdict_put_str(options, NVME_BLOCK_OPT_NAMESPACE,
+ *namespace ? namespace : "1");
}
}
@@ -1082,7 +1081,7 @@ static void nvme_refresh_filename(BlockDriverState *bs, QDict *opts)
bs->drv->format_name);
}
- qdict_put(opts, "driver", qstring_from_str(bs->drv->format_name));
+ qdict_put_str(opts, "driver", bs->drv->format_name);
bs->full_open_options = opts;
}
diff --git a/monitor.c b/monitor.c
index 77f4c41cfa6..de709fc2e5d 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4315,7 +4315,7 @@ static QObject *get_qmp_greeting(Monitor *mon)
/* Monitors that are not using IOThread won't support OOB */
continue;
}
- qlist_append(cap_list, qstring_from_str(QMPCapability_str(cap)));
+ qlist_append_str(cap_list, QMPCapability_str(cap));
}
return qobject_from_jsonf("{'QMP': {'version': %p, 'capabilities': %p}}",
--
2.14.3
next prev parent reply other threads:[~2018-03-27 14:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-27 14:30 [Qemu-devel] [PULL 00/14] QAPI changes for 2018-03-27, 2.12-rc1 Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 01/14] qmp-test: fix response leak Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 02/14] tests: Silence false positive warning on generated test name Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 03/14] error: Strip trailing '\n' from error string arguments (again again) Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 04/14] error: Remove NULL checks on error_propagate() calls Eric Blake
2018-03-27 14:30 ` Eric Blake [this message]
2018-03-27 14:30 ` [Qemu-devel] [PULL 06/14] qmp: fix qmp_capabilities error regression Eric Blake
2018-03-27 15:01 ` Marc-André Lureau
2018-03-27 15:16 ` Eric Blake
2018-03-27 15:31 ` Marc-André Lureau
2018-03-27 14:30 ` [Qemu-devel] [PULL 07/14] qapi: restrict allow-oob value to be "true" Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 08/14] tests: let qapi-schema tests detect oob Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 09/14] tests: add oob-test for qapi-schema Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 10/14] qmp: cleanup qmp queues properly Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 11/14] monitor: new parameter "x-oob" Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 12/14] tests: Add parameter to qtest_init_without_qmp_handshake Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 13/14] tests: qmp-test: add test for new "x-oob" Eric Blake
2018-03-27 14:30 ` [Qemu-devel] [PULL 14/14] hmp.c: Revert hmp_info_cpus output format change Eric Blake
2018-03-27 15:23 ` [Qemu-devel] [PULL 00/14] QAPI changes for 2018-03-27, 2.12-rc1 Eric Blake
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=20180327143014.1767669-6-eblake@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--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).