From e688df6bc4549f28534cdb001f168b8caae55b0c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 1 Feb 2018 12:18:31 +0100 Subject: Include qapi/error.h exactly where needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This cleanup makes the number of objects depending on qapi/error.h drop from 1910 (out of 4743) to 1612 in my "build everything" tree. While there, separate #include from file comment with a blank line, and drop a useless comment on why qemu/osdep.h is included first. Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster Message-Id: <20180201111846.21846-5-armbru@redhat.com> [Semantic conflict with commit 34e304e975 resolved, OSX breakage fixed] --- hw/usb/ccid-card-passthru.c | 1 - 1 file changed, 1 deletion(-) (limited to 'hw/usb') diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 085ed2c..b7dd360 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -9,7 +9,6 @@ */ #include "qemu/osdep.h" -#include "qapi/error.h" #include #include "chardev/char-fe.h" #include "qemu/error-report.h" -- cgit v1.1 From 452fcdbc49c59884c8c284268d64baa24fea11e1 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 1 Feb 2018 12:18:39 +0100 Subject: Include qapi/qmp/qdict.h exactly where needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This cleanup makes the number of objects depending on qapi/qmp/qdict.h drop from 4550 (out of 4743) to 368 in my "build everything" tree. For qapi/qmp/qobject.h, the number drops from 4552 to 390. While there, separate #include from file comment with a blank line. Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster Message-Id: <20180201111846.21846-13-armbru@redhat.com> --- hw/usb/xen-usb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/usb') diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index 584a6f2..3b67868 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -30,6 +30,7 @@ #include "hw/xen/xen_backend.h" #include "monitor/qdev.h" #include "qapi/qmp/qbool.h" +#include "qapi/qmp/qdict.h" #include "qapi/qmp/qstring.h" #include "hw/xen/io/ring.h" -- cgit v1.1 From bd006b9818b378786fb72a96514afc1299280db6 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 1 Feb 2018 12:18:41 +0100 Subject: Include qapi/qmp/qbool.h exactly where needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster Message-Id: <20180201111846.21846-15-armbru@redhat.com> --- hw/usb/xen-usb.c | 1 - 1 file changed, 1 deletion(-) (limited to 'hw/usb') diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index 3b67868..e9eb1e9 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -29,7 +29,6 @@ #include "hw/usb.h" #include "hw/xen/xen_backend.h" #include "monitor/qdev.h" -#include "qapi/qmp/qbool.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qstring.h" -- cgit v1.1 From 922a01a013d2270682a188258cbccacfecf8129c Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Thu, 1 Feb 2018 12:18:46 +0100 Subject: Move include qemu/option.h from qemu-common.h to actual users MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit qemu-common.h includes qemu/option.h, but most places that include the former don't actually need the latter. Drop the include, and add it to the places that actually need it. While there, drop superfluous includes of both headers, and separate #include from file comment with a blank line. This cleanup makes the number of objects depending on qemu/option.h drop from 4545 (out of 4743) to 284 in my "build everything" tree. Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster Message-Id: <20180201111846.21846-20-armbru@redhat.com> [Semantic conflict with commit bdd6a90a9e in block/nvme.c resolved] --- hw/usb/xen-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/usb') diff --git a/hw/usb/xen-usb.c b/hw/usb/xen-usb.c index e9eb1e9..3beeb0d 100644 --- a/hw/usb/xen-usb.c +++ b/hw/usb/xen-usb.c @@ -23,8 +23,8 @@ #include #include -#include "qemu-common.h" #include "qemu/config-file.h" +#include "qemu/option.h" #include "hw/sysbus.h" #include "hw/usb.h" #include "hw/xen/xen_backend.h" -- cgit v1.1