qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 01/15] qapi: Improve use of qmp/types.h
Date: Wed,  6 Jul 2016 11:13:52 +0200	[thread overview]
Message-ID: <1467796446-25446-2-git-send-email-armbru@redhat.com> (raw)
In-Reply-To: <1467796446-25446-1-git-send-email-armbru@redhat.com>

From: Eric Blake <eblake@redhat.com>

'qjson.h' is not a QObject subtype; include this file directly in
.c files that are using it, rather than abusing qmp/types.h for
that purpose.

Meanwhile, for files that include a list of individual QObject
subtypes, it's easier to just use qmp/types.h for that purpose.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <1465490926-28625-2-git-send-email-eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 hw/pci/pcie_aer.c                  | 1 +
 include/qapi/qmp/types.h           | 1 -
 monitor.c                          | 6 +-----
 qapi/qmp-dispatch.c                | 1 +
 qobject/json-parser.c              | 7 +------
 qobject/qjson.c                    | 6 +-----
 qobject/qobject.c                  | 7 +------
 tests/check-qjson.c                | 8 +-------
 tests/test-qmp-input-strict.c      | 1 +
 tests/test-qmp-input-visitor.c     | 1 +
 tests/test-qmp-output-visitor.c    | 1 +
 tests/test-visitor-serialization.c | 1 +
 12 files changed, 11 insertions(+), 30 deletions(-)

diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c
index e2d4e68..048ce6a 100644
--- a/hw/pci/pcie_aer.c
+++ b/hw/pci/pcie_aer.c
@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "sysemu/sysemu.h"
 #include "qapi/qmp/types.h"
+#include "qapi/qmp/qjson.h"
 #include "monitor/monitor.h"
 #include "hw/pci/pci_bridge.h"
 #include "hw/pci/pcie.h"
diff --git a/include/qapi/qmp/types.h b/include/qapi/qmp/types.h
index 7782ec5..f21ecf4 100644
--- a/include/qapi/qmp/types.h
+++ b/include/qapi/qmp/types.h
@@ -20,6 +20,5 @@
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qjson.h"
 
 #endif /* QEMU_OBJECTS_H */
diff --git a/monitor.c b/monitor.c
index 6f960f1..ed09cdc 100644
--- a/monitor.c
+++ b/monitor.c
@@ -54,11 +54,7 @@
 #include "qemu/acl.h"
 #include "sysemu/tpm.h"
 #include "qapi/qmp/qerror.h"
-#include "qapi/qmp/qint.h"
-#include "qapi/qmp/qfloat.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qbool.h"
-#include "qapi/qmp/qstring.h"
+#include "qapi/qmp/types.h"
 #include "qapi/qmp/qjson.h"
 #include "qapi/qmp/json-streamer.h"
 #include "qapi/qmp/json-parser.h"
diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c
index 08faf85..505eb41 100644
--- a/qapi/qmp-dispatch.c
+++ b/qapi/qmp-dispatch.c
@@ -16,6 +16,7 @@
 #include "qapi/qmp/types.h"
 #include "qapi/qmp/dispatch.h"
 #include "qapi/qmp/json-parser.h"
+#include "qapi/qmp/qjson.h"
 #include "qapi-types.h"
 #include "qapi/qmp/qerror.h"
 
diff --git a/qobject/json-parser.c b/qobject/json-parser.c
index 67ed727..c18e48a 100644
--- a/qobject/json-parser.c
+++ b/qobject/json-parser.c
@@ -14,12 +14,7 @@
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qemu-common.h"
-#include "qapi/qmp/qstring.h"
-#include "qapi/qmp/qint.h"
-#include "qapi/qmp/qdict.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qfloat.h"
-#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/types.h"
 #include "qapi/qmp/json-parser.h"
 #include "qapi/qmp/json-lexer.h"
 #include "qapi/qmp/json-streamer.h"
diff --git a/qobject/qjson.c b/qobject/qjson.c
index ef160d2..9a0de89 100644
--- a/qobject/qjson.c
+++ b/qobject/qjson.c
@@ -16,11 +16,7 @@
 #include "qapi/qmp/json-parser.h"
 #include "qapi/qmp/json-streamer.h"
 #include "qapi/qmp/qjson.h"
-#include "qapi/qmp/qint.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qbool.h"
-#include "qapi/qmp/qfloat.h"
-#include "qapi/qmp/qdict.h"
+#include "qapi/qmp/types.h"
 #include "qemu/unicode.h"
 
 typedef struct JSONParsingState
diff --git a/qobject/qobject.c b/qobject/qobject.c
index cd41fb9..fe4fa10 100644
--- a/qobject/qobject.c
+++ b/qobject/qobject.c
@@ -9,12 +9,7 @@
 
 #include "qemu/osdep.h"
 #include "qemu-common.h"
-#include "qapi/qmp/qbool.h"
-#include "qapi/qmp/qdict.h"
-#include "qapi/qmp/qfloat.h"
-#include "qapi/qmp/qint.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qstring.h"
+#include "qapi/qmp/types.h"
 
 static void (*qdestroy[QTYPE__MAX])(QObject *) = {
     [QTYPE_NONE] = NULL,               /* No such object exists */
diff --git a/tests/check-qjson.c b/tests/check-qjson.c
index 0e158f6..8595574 100644
--- a/tests/check-qjson.c
+++ b/tests/check-qjson.c
@@ -12,14 +12,8 @@
  */
 #include "qemu/osdep.h"
 
-#include "qapi/qmp/qstring.h"
-#include "qapi/qmp/qint.h"
-#include "qapi/qmp/qdict.h"
-#include "qapi/qmp/qlist.h"
-#include "qapi/qmp/qfloat.h"
-#include "qapi/qmp/qbool.h"
+#include "qapi/qmp/types.h"
 #include "qapi/qmp/qjson.h"
-
 #include "qemu-common.h"
 
 static void escaped_string(void)
diff --git a/tests/test-qmp-input-strict.c b/tests/test-qmp-input-strict.c
index d5f57c5..79739e9 100644
--- a/tests/test-qmp-input-strict.c
+++ b/tests/test-qmp-input-strict.c
@@ -19,6 +19,7 @@
 #include "test-qapi-types.h"
 #include "test-qapi-visit.h"
 #include "qapi/qmp/types.h"
+#include "qapi/qmp/qjson.h"
 #include "test-qmp-introspect.h"
 #include "qmp-introspect.h"
 #include "qapi-visit.h"
diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c
index 1a4585c..17cda5a 100644
--- a/tests/test-qmp-input-visitor.c
+++ b/tests/test-qmp-input-visitor.c
@@ -18,6 +18,7 @@
 #include "test-qapi-types.h"
 #include "test-qapi-visit.h"
 #include "qapi/qmp/types.h"
+#include "qapi/qmp/qjson.h"
 
 typedef struct TestInputVisitorData {
     QObject *obj;
diff --git a/tests/test-qmp-output-visitor.c b/tests/test-qmp-output-visitor.c
index f8a7a27..e030c67 100644
--- a/tests/test-qmp-output-visitor.c
+++ b/tests/test-qmp-output-visitor.c
@@ -18,6 +18,7 @@
 #include "test-qapi-types.h"
 #include "test-qapi-visit.h"
 #include "qapi/qmp/types.h"
+#include "qapi/qmp/qjson.h"
 
 typedef struct TestOutputVisitorData {
     QmpOutputVisitor *qov;
diff --git a/tests/test-visitor-serialization.c b/tests/test-visitor-serialization.c
index 777469f..db781c0 100644
--- a/tests/test-visitor-serialization.c
+++ b/tests/test-visitor-serialization.c
@@ -19,6 +19,7 @@
 #include "test-qapi-visit.h"
 #include "qapi/error.h"
 #include "qapi/qmp/types.h"
+#include "qapi/qmp/qjson.h"
 #include "qapi/qmp-input-visitor.h"
 #include "qapi/qmp-output-visitor.h"
 #include "qapi/string-input-visitor.h"
-- 
2.5.5

  reply	other threads:[~2016-07-06  9:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06  9:13 [Qemu-devel] [PULL 00/15] QAPI patches for 2016-07-06 Markus Armbruster
2016-07-06  9:13 ` Markus Armbruster [this message]
2016-07-06  9:13 ` [Qemu-devel] [PULL 02/15] qemu-img: Don't leak errors when outputting JSON Markus Armbruster
2016-07-06  9:13 ` [Qemu-devel] [PULL 03/15] qapi: Add parameter to visit_end_* Markus Armbruster
2016-07-06  9:13 ` [Qemu-devel] [PULL 04/15] qapi: Add new visit_free() function Markus Armbruster
2016-07-06  9:13 ` [Qemu-devel] [PULL 05/15] opts-visitor: Favor " Markus Armbruster
2016-07-06  9:13 ` [Qemu-devel] [PULL 06/15] string-input-visitor: " Markus Armbruster
2016-07-06  9:13 ` [Qemu-devel] [PULL 07/15] qmp-input-visitor: " Markus Armbruster
2016-07-06  9:13 ` [Qemu-devel] [PULL 08/15] string-output-visitor: " Markus Armbruster
2016-07-06  9:14 ` [Qemu-devel] [PULL 09/15] qmp-output-visitor: " Markus Armbruster
2016-07-06  9:14 ` [Qemu-devel] [PULL 10/15] tests: Clean up test-string-output-visitor Markus Armbruster
2016-07-06  9:14 ` [Qemu-devel] [PULL 11/15] tests: Factor out common code in qapi output tests Markus Armbruster
2016-07-06  9:14 ` [Qemu-devel] [PULL 12/15] qapi: Add new visit_complete() function Markus Armbruster
2016-07-06  9:14 ` [Qemu-devel] [PULL 13/15] qapi: Add new clone visitor Markus Armbruster
2016-07-06  9:14 ` [Qemu-devel] [PULL 14/15] sockets: Use new QAPI cloning Markus Armbruster
2016-07-06  9:14 ` [Qemu-devel] [PULL 15/15] replay: " Markus Armbruster
2016-07-06 11:46 ` [Qemu-devel] [PULL 00/15] QAPI patches for 2016-07-06 Peter Maydell

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=1467796446-25446-2-git-send-email-armbru@redhat.com \
    --to=armbru@redhat.com \
    --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).