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] --- migration/colo-failover.c | 1 + migration/colo.c | 1 + migration/exec.c | 1 - migration/fd.c | 1 - migration/migration.c | 1 + migration/ram.c | 2 ++ migration/savevm.c | 1 + 7 files changed, 6 insertions(+), 2 deletions(-) (limited to 'migration') diff --git a/migration/colo-failover.c b/migration/colo-failover.c index 6563862..891785c 100644 --- a/migration/colo-failover.c +++ b/migration/colo-failover.c @@ -16,6 +16,7 @@ #include "qemu/main-loop.h" #include "migration.h" #include "qmp-commands.h" +#include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "qemu/error-report.h" #include "trace.h" diff --git a/migration/colo.c b/migration/colo.c index dee3aa8..245a46d 100644 --- a/migration/colo.c +++ b/migration/colo.c @@ -12,6 +12,7 @@ #include "qemu/osdep.h" #include "sysemu/sysemu.h" +#include "qapi/error.h" #include "qemu-file-channel.h" #include "migration.h" #include "qemu-file.h" diff --git a/migration/exec.c b/migration/exec.c index c953797..0bc5a42 100644 --- a/migration/exec.c +++ b/migration/exec.c @@ -18,7 +18,6 @@ */ #include "qemu/osdep.h" -#include "qapi/error.h" #include "channel.h" #include "exec.h" #include "io/channel-command.h" diff --git a/migration/fd.c b/migration/fd.c index 6284a97..cd06182 100644 --- a/migration/fd.c +++ b/migration/fd.c @@ -15,7 +15,6 @@ */ #include "qemu/osdep.h" -#include "qapi/error.h" #include "channel.h" #include "fd.h" #include "monitor/monitor.h" diff --git a/migration/migration.c b/migration/migration.c index 0fdb2e4..274160e 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -30,6 +30,7 @@ #include "qemu-file.h" #include "migration/vmstate.h" #include "block/block.h" +#include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "qemu/rcu.h" #include "block.h" diff --git a/migration/ram.c b/migration/ram.c index 5a109ef..8333d8e 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -25,6 +25,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #include "qemu/osdep.h" #include "cpu.h" #include @@ -42,6 +43,7 @@ #include "postcopy-ram.h" #include "migration/page_cache.h" #include "qemu/error-report.h" +#include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "trace.h" #include "exec/ram_addr.h" diff --git a/migration/savevm.c b/migration/savevm.c index f202c3d..3f611c0 100644 --- a/migration/savevm.c +++ b/migration/savevm.c @@ -40,6 +40,7 @@ #include "qemu-file.h" #include "savevm.h" #include "postcopy-ram.h" +#include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "qemu/error-report.h" #include "sysemu/cpus.h" -- cgit v1.1