From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay0L3-00058x-De for qemu-devel@nongnu.org; Wed, 04 May 2016 13:11:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ay0Kr-0007Aa-KR for qemu-devel@nongnu.org; Wed, 04 May 2016 13:11:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ay0Kr-00077V-EJ for qemu-devel@nongnu.org; Wed, 04 May 2016 13:11:41 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5F66ABF9CB for ; Wed, 4 May 2016 17:11:30 +0000 (UTC) References: <1462380558-2030-1-git-send-email-armbru@redhat.com> <1462380558-2030-2-git-send-email-armbru@redhat.com> From: Eric Blake Message-ID: <572A2D41.1050805@redhat.com> Date: Wed, 4 May 2016 11:11:29 -0600 MIME-Version: 1.0 In-Reply-To: <1462380558-2030-2-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HllaXVd740K9M7Kl8dpNh0rUAXc67jOBO" Subject: Re: [Qemu-devel] [PATCH 1/2] migration: Move qjson.[ch] to migration/ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: dgilbert@redhat.com, quintela@redhat.com, amit.shah@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HllaXVd740K9M7Kl8dpNh0rUAXc67jOBO Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > QAPI output visitors also produce JSON text. They assert their > preconditions and invariants, and therefore abort on incorrect use. >=20 > Contrastingly, QJSON does *not* detect incorrect use. It happily > produces invalid JSON then. This is what migration wants. >=20 > 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. >=20 > +++ b/include/migration/vmstate.h > @@ -29,7 +29,7 @@ > #ifndef CONFIG_USER_ONLY > #include > #endif > -#include > +#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 > -#include > -#include > -#include > -#include > +#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 whether or not you touch up the commit message to call out ids --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --HllaXVd740K9M7Kl8dpNh0rUAXc67jOBO Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXKi1BAAoJEKeha0olJ0NqY1IIAIpwbFCRz8/ruzwDjbtof0qK 5S4OTvWOLNpviukc2slq+HmQjNpFi7l9dW5mE41volPTpPWnAG2QbwdEPmYj0AfI A22iiVZoPjlrlSq7i7f59ltYSYZxEvArliNk18zdmYDyDL5f7LOuaK4qYrk/4rp+ rEL0Kux5naUgstFcBxflo6EBCiEHVL3MI9Pc9RUG1lr7jkPewtqcBhSNOK8JlZPA GxfzfK8cHVWSuFtWnzUr/ozstZMRUNaBPevOH7uH+VCa3mEy+DT9PCUlL0VCOgZF drIJJj9rJ8kecy+KJuoD4eRYn6uV/MN8cPc/BSZspq6pcZEWbvHSnZ1BveWkcuA= =jkY7 -----END PGP SIGNATURE----- --HllaXVd740K9M7Kl8dpNh0rUAXc67jOBO--