From: John Snow <jsnow@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, qemu-trivial@nongnu.org,
Markus Armbruster <armbru@redhat.com>,
Peter Xu <peterx@redhat.com>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] cutils: Move size_to_str() from "qemu-common.h" to "qemu/cutils.h"
Date: Tue, 3 Sep 2019 14:57:31 -0400 [thread overview]
Message-ID: <6aca73a4-1567-4952-14eb-ecd3c115acad@redhat.com> (raw)
In-Reply-To: <20190903120555.7551-1-philmd@redhat.com>
On 9/3/19 8:05 AM, Philippe Mathieu-Daudé wrote:
> "qemu/cutils.h" contains various qemu_strtosz_*() functions
> useful to convert strings to size. It seems natural to have
> the opposite usage (from size to string) there too.
>
> The function definition is already in util/cutils.c.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> There are only 5 users, is it worthwhile renaming it qemu_sztostrt()?
(On the other hand, "size_to_str" is easy to read and "sztostrt" looks
like someone sneezed with their hand on the keyboard.)
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> block/qapi.c | 2 +-
> include/qemu-common.h | 1 -
> include/qemu/cutils.h | 2 ++
> qapi/string-output-visitor.c | 2 +-
> 4 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/block/qapi.c b/block/qapi.c
> index 15f1030264..7ee2ee065d 100644
> --- a/block/qapi.c
> +++ b/block/qapi.c
> @@ -23,7 +23,7 @@
> */
>
> #include "qemu/osdep.h"
> -#include "qemu-common.h"
> +#include "qemu/cutils.h"
I guess that's a more targeted inclusion. (That was the last thing we
needed in there?)
Seems proper. It must be an oversight to begin with that we declared it
in qemu-common but defined it in cutils.
Reviewed-by: John Snow <jsnow@redhat.com>
next prev parent reply other threads:[~2019-09-03 18:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 12:05 [Qemu-devel] [PATCH] cutils: Move size_to_str() from "qemu-common.h" to "qemu/cutils.h" Philippe Mathieu-Daudé
2019-09-03 18:57 ` John Snow [this message]
2019-09-04 2:16 ` [Qemu-devel] [Qemu-block] " Peter Xu
2019-09-19 9:57 ` [Qemu-devel] [Qemu-trivial] " Laurent Vivier
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=6aca73a4-1567-4952-14eb-ecd3c115acad@redhat.com \
--to=jsnow@redhat.com \
--cc=armbru@redhat.com \
--cc=kwolf@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=mreitz@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--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).