From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: qemu-devel@nongnu.org,
"Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Kevin Wolf" <kwolf@redhat.com>,
"Richard Henderson" <rth@twiddle.net>,
qemu-arm@nongnu.org, "Eric Blake" <eblake@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Max Reitz" <mreitz@redhat.com>, "Fam Zheng" <famz@redhat.com>,
qemu-trivial@nongnu.org, "Alexander Graf" <agraf@suse.de>,
qemu-ppc@nongnu.org, "Peter Maydell" <peter.maydell@linaro.org>,
"Alberto Garcia" <berto@igalia.com>,
qemu-block@nongnu.org, "Igor Mitsyanko" <i.mitsyanko@gmail.com>,
"Yongbok Kim" <yongbok.kim@mips.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Max Filippov" <jcmvbkbc@gmail.com>,
"Markus Armbruster" <armbru@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/4] qdict: remove useless cast
Date: Thu, 22 Mar 2018 16:23:41 +0000 [thread overview]
Message-ID: <20180322162341.GC3205@work-vm> (raw)
In-Reply-To: <20180322161226.29796-4-lvivier@redhat.com>
* Laurent Vivier (lvivier@redhat.com) wrote:
> Re-run Coccinelle script scripts/coccinelle/qobject.cocci
>
> Signed-off-by: Laurent Vivier <lvivier@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 8bca57aae6..c4f3a7bc94 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 6ccd2fc089..6e7667d82f 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -4316,7 +4316,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}}",
For monitor:
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> --
> 2.14.3
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2018-03-22 16:24 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-22 16:12 [Qemu-devel] [PATCH 0/4] coccinelle: re-run scripts from scripts/coccinelle Laurent Vivier
2018-03-22 16:12 ` [Qemu-devel] [PATCH 1/4] error: Strip trailing '\n' from error string arguments (again again) Laurent Vivier
2018-03-22 16:12 ` [Qemu-devel] [PATCH 2/4] error: Remove NULL checks on error_propagate() calls Laurent Vivier
2018-03-23 20:50 ` Eric Blake
2018-03-26 8:40 ` Laurent Vivier
2018-03-22 16:12 ` [Qemu-devel] [PATCH 3/4] qdict: remove useless cast Laurent Vivier
2018-03-22 16:23 ` Dr. David Alan Gilbert [this message]
2018-03-27 3:01 ` Fam Zheng
2018-03-22 16:12 ` [Qemu-devel] [PATCH 4/4] Remove unnecessary variables for function return value Laurent Vivier
2018-03-22 16:45 ` Eric Blake
2018-03-22 16:51 ` Max Filippov
2018-03-22 16:58 ` Laurent Vivier
2018-03-22 17:19 ` Max Filippov
2018-03-22 17:23 ` Peter Maydell
2018-03-22 17:26 ` Max Filippov
2018-03-22 17:30 ` Eric Blake
2018-03-22 17:40 ` Peter Maydell
2018-03-22 16:59 ` Eric Blake
2018-03-22 17:06 ` Max Filippov
2018-03-22 23:06 ` David Gibson
2018-03-23 2:14 ` [Qemu-devel] [Qemu-arm] " Philippe Mathieu-Daudé
2018-03-23 10:44 ` [Qemu-devel] " Alberto Garcia
2018-03-22 16:27 ` [Qemu-devel] [PATCH 0/4] coccinelle: re-run scripts from scripts/coccinelle Eric Blake
2018-03-22 16:45 ` Eric Blake
2018-03-22 17:57 ` no-reply
2018-03-22 18:00 ` Peter Maydell
2018-03-22 19:12 ` Eric Blake
2018-03-22 19:17 ` Peter Maydell
2018-03-23 12:37 ` Michael Tokarev
2018-03-23 12:40 ` Laurent Vivier
2018-03-23 17:42 ` 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=20180322162341.GC3205@work-vm \
--to=dgilbert@redhat.com \
--cc=agraf@suse.de \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=berrange@redhat.com \
--cc=berto@igalia.com \
--cc=crosthwaite.peter@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=eblake@redhat.com \
--cc=ehabkost@redhat.com \
--cc=famz@redhat.com \
--cc=i.mitsyanko@gmail.com \
--cc=jasowang@redhat.com \
--cc=jcmvbkbc@gmail.com \
--cc=kwolf@redhat.com \
--cc=lvivier@redhat.com \
--cc=mreitz@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=rth@twiddle.net \
--cc=yongbok.kim@mips.com \
/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).