Include qapi/error.h exactly where needed

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.

Backports commit e688df6bc4549f28534cdb001f168b8caae55b0c from qemu
This commit is contained in:
Markus Armbruster 2018-03-07 12:26:37 -05:00 committed by Lioncash
parent aa7a707738
commit 5d554fefeb
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
7 changed files with 6 additions and 4 deletions

View file

@ -24,10 +24,10 @@
/* Modified for Unicorn Engine by Nguyen Anh Quynh, 2015 */
/* Needed early for CONFIG_BSD etc. */
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "cpu.h"
#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "exec/exec-all.h"

View file

@ -30,6 +30,7 @@
#include "sysemu/cpus.h"
#include "sysemu/sysemu.h"
#include "target/i386/topology.h"
#include "qapi/error.h"
#include "qapi-visit.h"

View file

@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "qapi/error.h"
#include "hw/i386/pc.h"
#include "hw/boards.h"
#include "exec/address-spaces.h"

View file

@ -13,7 +13,6 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qapi/qmp/qnum.h"
#include "qapi/qmp/qobject.h"
#include "qemu-common.h"

View file

@ -206,6 +206,7 @@ fdef.write(mcgen('''
#include "qemu-common.h"
#include "%(prefix)sqapi-event.h"
#include "%(prefix)sqapi-visit.h"
#include "qapi/error.h"
#include "qapi/qobject-output-visitor.h"
#include "qapi/qmp-event.h"
@ -213,7 +214,6 @@ fdef.write(mcgen('''
prefix=prefix))
fdecl.write(mcgen('''
#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
#include "%(prefix)sqapi-types.h"

View file

@ -19,13 +19,13 @@
#include "qemu/osdep.h"
#include "qemu/cutils.h"
#include "qapi/error.h"
#include "unicorn/platform.h"
#include "cpu.h"
#include "exec/exec-all.h"
#include "sysemu/cpus.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qapi-visit.h"

View file

@ -26,6 +26,7 @@
/* By Nguyen Anh Quynh, 2015 */
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/cutils.h"
#include "hw/boards.h" // MachineClass
#include "sysemu/sysemu.h"