From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: dgilbert@redhat.com, quintela@redhat.com, amit.shah@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/2] migration: Move qjson.[ch] to migration/
Date: Wed, 4 May 2016 11:11:29 -0600 [thread overview]
Message-ID: <572A2D41.1050805@redhat.com> (raw)
In-Reply-To: <1462380558-2030-2-git-send-email-armbru@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1857 bytes --]
On 05/04/2016 10:49 AM, Markus Armbruster wrote:
> Type QJSON lets you build JSON text. Its interface mirrors (a subset
> of) abstract JSON syntax.
>
> QAPI output visitors also produce JSON text. They assert their
> preconditions and invariants, and therefore abort on incorrect use.
>
> Contrastingly, QJSON does *not* detect incorrect use. It happily
> produces invalid JSON then. This is what migration wants.
>
> QJSON was designed for migration, and migration is its only user.
Worth calling out commits 0457d07..b174257 here?
> Move it to migration/ for proper coverage by MAINTAINERS, and to deter
> accidental use outside migration.
>
> +++ b/include/migration/vmstate.h
> @@ -29,7 +29,7 @@
> #ifndef CONFIG_USER_ONLY
> #include <migration/qemu-file.h>
> #endif
> -#include <qjson.h>
> +#include "migration/qjson.h"
I thought you weren't a fan of including .h from .h, where it was
avoidable. But I guess you aren't adding any new .h, so much as
converting an existing use.
> +
> #include "qemu/osdep.h"
> -#include <qapi/qmp/qstring.h>
> -#include <glib.h>
> -#include <qjson.h>
> -#include <qemu/module.h>
> -#include <qom/object.h>
> +#include "qapi/qmp/qstring.h"
> +#include "migration/qjson.h"
> +#include "qemu/module.h"
> +#include "qom/object.h"
Thanks for fixing the mis-use of <> while at it :)
> +++ b/migration/vmstate.c
> @@ -6,7 +6,6 @@
> #include "qemu/bitops.h"
> #include "qemu/error-report.h"
> #include "trace.h"
> -#include "qjson.h"
This is because you are relying on the .h doing it for you.
As mentioned on the cover letter,
Reviewed-by: Eric Blake <eblake@redhat.com>
whether or not you touch up the commit message to call out ids
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-05-04 17:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-04 16:49 [Qemu-devel] [PATCH 0/2] migration: Move qjson.[ch] to migration/, clean up Markus Armbruster
2016-05-04 16:49 ` [Qemu-devel] [PATCH 1/2] migration: Move qjson.[ch] to migration/ Markus Armbruster
2016-05-04 17:11 ` Eric Blake [this message]
2016-05-06 13:07 ` Markus Armbruster
2016-05-05 13:52 ` Dr. David Alan Gilbert
2016-05-04 16:49 ` [Qemu-devel] [PATCH 2/2] migration/qjson: Drop gratuitous use of QOM Markus Armbruster
2016-05-04 17:08 ` [Qemu-devel] [PATCH 0/2] migration: Move qjson.[ch] to migration/, clean up Eric Blake
2016-05-06 13:11 ` Markus Armbruster
2016-05-23 8:36 ` Amit Shah
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=572A2D41.1050805@redhat.com \
--to=eblake@redhat.com \
--cc=amit.shah@redhat.com \
--cc=armbru@redhat.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.