diff mbox

[8/8] include: Clean up includes

Message ID 1455818725-7647-9-git-send-email-peter.maydell@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Peter Maydell Feb. 18, 2016, 6:05 p.m. UTC
Clean up includes so that osdep.h is included first and headers
which it implies are not included manually.

This commit was created with scripts/clean-includes.

NB: If this commit breaks compilation for your out-of-tree
patchseries or fork, then you need to make sure you add
#include "qemu/osdep.h" to any new .c files that you have.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 include/block/accounting.h            | 2 --
 include/block/nbd.h                   | 1 -
 include/block/snapshot.h              | 1 -
 include/block/write-threshold.h       | 1 -
 include/config.h                      | 1 -
 include/crypto/cipher.h               | 1 -
 include/crypto/hash.h                 | 1 -
 include/crypto/init.h                 | 1 -
 include/crypto/secret.h               | 1 -
 include/crypto/tlscreds.h             | 1 -
 include/elf.h                         | 1 -
 include/exec/cpu-all.h                | 1 -
 include/exec/cpu-defs.h               | 3 ---
 include/exec/helper-head.h            | 1 -
 include/exec/memory.h                 | 3 ---
 include/exec/user/thunk.h             | 1 -
 include/fpu/softfloat.h               | 3 ---
 include/hw/acpi/acpi.h                | 1 -
 include/hw/acpi/aml-build.h           | 2 --
 include/hw/acpi/bios-linker-loader.h  | 2 --
 include/hw/acpi/pcihp.h               | 1 -
 include/hw/block/block.h              | 1 -
 include/hw/i386/topology.h            | 2 --
 include/hw/isa/apm.h                  | 1 -
 include/hw/nvram/fw_cfg.h             | 2 --
 include/hw/pci/pci.h                  | 1 -
 include/hw/pci/shpc.h                 | 1 -
 include/hw/qdev-core.h                | 1 -
 include/hw/virtio/vhost-backend.h     | 1 -
 include/hw/xen/xen.h                  | 1 -
 include/hw/xen/xen_common.h           | 3 ---
 include/io/channel.h                  | 1 -
 include/io/task.h                     | 1 -
 include/libdecnumber/dconfig.h        | 1 -
 include/libdecnumber/decContext.h     | 3 ---
 include/libdecnumber/decNumberLocal.h | 2 --
 include/migration/migration.h         | 1 -
 include/migration/qemu-file.h         | 1 -
 include/net/checksum.h                | 1 -
 include/net/eth.h                     | 2 --
 include/qapi/error.h                  | 3 ---
 include/qapi/qmp-event.h              | 1 -
 include/qapi/qmp/dispatch.h           | 1 -
 include/qapi/qmp/json-lexer.h         | 1 -
 include/qapi/qmp/json-parser.h        | 1 -
 include/qapi/qmp/json-streamer.h      | 2 --
 include/qapi/qmp/qbool.h              | 1 -
 include/qapi/qmp/qdict.h              | 2 --
 include/qapi/qmp/qfloat.h             | 1 -
 include/qapi/qmp/qint.h               | 1 -
 include/qapi/qmp/qjson.h              | 2 --
 include/qapi/qmp/qobject.h            | 2 --
 include/qapi/qmp/qstring.h            | 1 -
 include/qapi/visitor-impl.h           | 1 -
 include/qapi/visitor.h                | 2 --
 include/qemu-common.h                 | 1 -
 include/qemu/atomic.h                 | 1 -
 include/qemu/bitmap.h                 | 3 ---
 include/qemu/bitops.h                 | 2 --
 include/qemu/bswap.h                  | 5 -----
 include/qemu/compatfd.h               | 1 -
 include/qemu/compiler.h               | 1 -
 include/qemu/config-file.h            | 2 --
 include/qemu/coroutine.h              | 1 -
 include/qemu/error-report.h           | 3 ---
 include/qemu/fprintf-fn.h             | 2 --
 include/qemu/hbitmap.h                | 3 ---
 include/qemu/host-utils.h             | 3 ---
 include/qemu/int128.h                 | 3 ---
 include/qemu/log.h                    | 4 ----
 include/qemu/memfd.h                  | 2 --
 include/qemu/module.h                 | 1 -
 include/qemu/option.h                 | 2 --
 include/qemu/range.h                  | 1 -
 include/qemu/rcu.h                    | 7 -------
 include/qemu/sockets.h                | 2 --
 include/qemu/thread.h                 | 2 --
 include/qemu/throttle.h               | 1 -
 include/qemu/timed-average.h          | 1 -
 include/qemu/xattr.h                  | 1 -
 include/qom/cpu.h                     | 1 -
 include/qom/object.h                  | 3 ---
 include/sysemu/block-backend.h        | 1 -
 include/sysemu/blockdev.h             | 1 -
 include/sysemu/dma.h                  | 1 -
 include/sysemu/hostmem.h              | 1 -
 include/sysemu/kvm.h                  | 2 --
 include/sysemu/numa.h                 | 1 -
 include/sysemu/os-posix.h             | 1 -
 include/sysemu/qtest.h                | 1 -
 include/sysemu/replay.h               | 3 ---
 include/sysemu/rng.h                  | 1 -
 include/sysemu/seccomp.h              | 1 -
 include/sysemu/tpm_backend.h          | 1 -
 include/sysemu/xen-mapcache.h         | 1 -
 include/ui/console.h                  | 1 -
 include/ui/qemu-spice.h               | 1 -
 97 files changed, 156 deletions(-)

Comments

Eric Blake Feb. 18, 2016, 7:54 p.m. UTC | #1
On 02/18/2016 11:05 AM, Peter Maydell wrote:
> Clean up includes so that osdep.h is included first and headers
> which it implies are not included manually.
> 
> This commit was created with scripts/clean-includes.
> 
> NB: If this commit breaks compilation for your out-of-tree
> patchseries or fork, then you need to make sure you add
> #include "qemu/osdep.h" to any new .c files that you have.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---

>  97 files changed, 156 deletions(-)

> 
> +++ b/include/migration/qemu-file.h
> @@ -25,7 +25,6 @@
>  #define QEMU_FILE_H 1
>  #include "exec/cpu-common.h"
>  
> -#include <stdint.h>
>  
>  /* This function writes a chunk of data to a file at the given position.

Cleanups like this change the resulting whitespace in the file.  I don't
personally care, but I'm pointing it out in case someone does.

Reviewed-by: Eric Blake <eblake@redhat.com>
Peter Maydell Feb. 18, 2016, 8:12 p.m. UTC | #2
On 18 February 2016 at 19:54, Eric Blake <eblake@redhat.com> wrote:
> On 02/18/2016 11:05 AM, Peter Maydell wrote:
>> Clean up includes so that osdep.h is included first and headers
>> which it implies are not included manually.
>>
>> This commit was created with scripts/clean-includes.
>>
>> NB: If this commit breaks compilation for your out-of-tree
>> patchseries or fork, then you need to make sure you add
>> #include "qemu/osdep.h" to any new .c files that you have.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>
>>  97 files changed, 156 deletions(-)
>
>>
>> +++ b/include/migration/qemu-file.h
>> @@ -25,7 +25,6 @@
>>  #define QEMU_FILE_H 1
>>  #include "exec/cpu-common.h"
>>
>> -#include <stdint.h>
>>
>>  /* This function writes a chunk of data to a file at the given position.
>
> Cleanups like this change the resulting whitespace in the file.  I don't
> personally care, but I'm pointing it out in case someone does.

Oh, you mean we end up with two blank lines in a row? Yeah,
I don't care about that either :-)

thanks
-- PMM
diff mbox

Patch

diff --git a/include/block/accounting.h b/include/block/accounting.h
index 0f46cb4..2db2a00 100644
--- a/include/block/accounting.h
+++ b/include/block/accounting.h
@@ -25,8 +25,6 @@ 
 #ifndef BLOCK_ACCOUNTING_H
 #define BLOCK_ACCOUNTING_H
 
-#include <stdint.h>
-#include <stdbool.h>
 
 #include "qemu/typedefs.h"
 #include "qemu/timed-average.h"
diff --git a/include/block/nbd.h b/include/block/nbd.h
index b197adc..b86a976 100644
--- a/include/block/nbd.h
+++ b/include/block/nbd.h
@@ -19,7 +19,6 @@ 
 #ifndef NBD_H
 #define NBD_H
 
-#include <sys/types.h>
 
 #include "qemu-common.h"
 #include "qemu/option.h"
diff --git a/include/block/snapshot.h b/include/block/snapshot.h
index c6910da6..e5c0553 100644
--- a/include/block/snapshot.h
+++ b/include/block/snapshot.h
@@ -26,7 +26,6 @@ 
 #define SNAPSHOT_H
 
 #include "qemu-common.h"
-#include "qapi/error.h"
 #include "qemu/option.h"
 
 
diff --git a/include/block/write-threshold.h b/include/block/write-threshold.h
index f1b899c..8a79505 100644
--- a/include/block/write-threshold.h
+++ b/include/block/write-threshold.h
@@ -12,7 +12,6 @@ 
 #ifndef BLOCK_WRITE_THRESHOLD_H
 #define BLOCK_WRITE_THRESHOLD_H
 
-#include <stdint.h>
 
 #include "qemu/typedefs.h"
 #include "qemu-common.h"
diff --git a/include/config.h b/include/config.h
index e20f786..992d761 100644
--- a/include/config.h
+++ b/include/config.h
@@ -1,2 +1 @@ 
-#include "config-host.h"
 #include "config-target.h"
diff --git a/include/crypto/cipher.h b/include/crypto/cipher.h
index f90ac79..c04c3ac 100644
--- a/include/crypto/cipher.h
+++ b/include/crypto/cipher.h
@@ -22,7 +22,6 @@ 
 #define QCRYPTO_CIPHER_H__
 
 #include "qemu-common.h"
-#include "qapi/error.h"
 
 typedef struct QCryptoCipher QCryptoCipher;
 
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index 5e8d9a1..aebccd1 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -22,7 +22,6 @@ 
 #define QCRYPTO_HASH_H__
 
 #include "qemu-common.h"
-#include "qapi/error.h"
 
 /* See also "QCryptoHashAlgorithm" defined in qapi/crypto.json */
 
diff --git a/include/crypto/init.h b/include/crypto/init.h
index 5fc510c..4836a37 100644
--- a/include/crypto/init.h
+++ b/include/crypto/init.h
@@ -22,7 +22,6 @@ 
 #define QCRYPTO_INIT_H__
 
 #include "qemu-common.h"
-#include "qapi/error.h"
 
 int qcrypto_init(Error **errp);
 
diff --git a/include/crypto/secret.h b/include/crypto/secret.h
index 913519a..60f2a50 100644
--- a/include/crypto/secret.h
+++ b/include/crypto/secret.h
@@ -22,7 +22,6 @@ 
 #define QCRYPTO_SECRET_H__
 
 #include "qemu-common.h"
-#include "qapi/error.h"
 #include "qom/object.h"
 
 #define TYPE_QCRYPTO_SECRET "secret"
diff --git a/include/crypto/tlscreds.h b/include/crypto/tlscreds.h
index 21761b7..4bf1d2e 100644
--- a/include/crypto/tlscreds.h
+++ b/include/crypto/tlscreds.h
@@ -22,7 +22,6 @@ 
 #define QCRYPTO_TLSCRED_H__
 
 #include "qemu-common.h"
-#include "qapi/error.h"
 #include "qom/object.h"
 
 #ifdef CONFIG_GNUTLS
diff --git a/include/elf.h b/include/elf.h
index 1098d21..28d448bb 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -1,7 +1,6 @@ 
 #ifndef _QEMU_ELF_H
 #define _QEMU_ELF_H
 
-#include <inttypes.h>
 
 /* 32-bit ELF base types. */
 typedef uint32_t Elf32_Addr;
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 83b1781..08e5093 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -154,7 +154,6 @@  static inline void tswap64s(uint64_t *s)
 /* MMU memory access macros */
 
 #if defined(CONFIG_USER_ONLY)
-#include <assert.h>
 #include "exec/user/abitypes.h"
 
 /* On some host systems the guest address space is reserved on the host.
diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index 5093be2..854e7e3 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -23,9 +23,6 @@ 
 #error cpu.h included from common code
 #endif
 
-#include "config.h"
-#include <inttypes.h>
-#include "qemu/osdep.h"
 #include "qemu/queue.h"
 #include "tcg-target.h"
 #ifndef CONFIG_USER_ONLY
diff --git a/include/exec/helper-head.h b/include/exec/helper-head.h
index b009ccb..ec79043 100644
--- a/include/exec/helper-head.h
+++ b/include/exec/helper-head.h
@@ -18,7 +18,6 @@ 
 #ifndef DEF_HELPER_H
 #define DEF_HELPER_H 1
 
-#include "qemu/osdep.h"
 
 #define HELPER(name) glue(helper_, name)
 
diff --git a/include/exec/memory.h b/include/exec/memory.h
index c92734a..d5f2b2c 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -21,8 +21,6 @@ 
 #define DIRTY_MEMORY_MIGRATION 2
 #define DIRTY_MEMORY_NUM       3        /* num of dirty bits */
 
-#include <stdint.h>
-#include <stdbool.h>
 #include "exec/cpu-common.h"
 #ifndef CONFIG_USER_ONLY
 #include "exec/hwaddr.h"
@@ -31,7 +29,6 @@ 
 #include "qemu/queue.h"
 #include "qemu/int128.h"
 #include "qemu/notify.h"
-#include "qapi/error.h"
 #include "qom/object.h"
 #include "qemu/rcu.h"
 
diff --git a/include/exec/user/thunk.h b/include/exec/user/thunk.h
index 3b67462..ad1d602 100644
--- a/include/exec/user/thunk.h
+++ b/include/exec/user/thunk.h
@@ -19,7 +19,6 @@ 
 #ifndef THUNK_H
 #define THUNK_H
 
-#include <inttypes.h>
 #include "cpu.h"
 
 /* types enums definitions */
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index 575a739..84145b1 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -86,9 +86,6 @@  this code that are retained.
 #include <sunmath.h>
 #endif
 
-#include <inttypes.h>
-#include "config-host.h"
-#include "qemu/osdep.h"
 
 /* This 'flag' type must be able to hold at least 0 and 1. It should
  * probably be replaced with 'bool' but the uses would need to be audited
diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h
index 2de3021..7462e20 100644
--- a/include/hw/acpi/acpi.h
+++ b/include/hw/acpi/acpi.h
@@ -19,7 +19,6 @@ 
  * <http://www.gnu.org/licenses/>.
  */
 
-#include "qapi/error.h"
 #include "qemu/typedefs.h"
 #include "qemu/notify.h"
 #include "qemu/option.h"
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index aa29d30..d3e0c8f 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -1,9 +1,7 @@ 
 #ifndef HW_ACPI_GEN_UTILS_H
 #define HW_ACPI_GEN_UTILS_H
 
-#include <stdint.h>
 #include <glib.h>
-#include "qemu/compiler.h"
 #include "hw/acpi/acpi-defs.h"
 
 /* Reserve RAM space for tables: add another order of magnitude. */
diff --git a/include/hw/acpi/bios-linker-loader.h b/include/hw/acpi/bios-linker-loader.h
index 498c0af..721b7b9 100644
--- a/include/hw/acpi/bios-linker-loader.h
+++ b/include/hw/acpi/bios-linker-loader.h
@@ -2,8 +2,6 @@ 
 #define BIOS_LINKER_LOADER_H
 
 #include <glib.h>
-#include <stdbool.h>
-#include <inttypes.h>
 
 GArray *bios_linker_loader_init(void);
 
diff --git a/include/hw/acpi/pcihp.h b/include/hw/acpi/pcihp.h
index f3526d4..31b7820 100644
--- a/include/hw/acpi/pcihp.h
+++ b/include/hw/acpi/pcihp.h
@@ -27,7 +27,6 @@ 
 #ifndef HW_ACPI_PCIHP_H
 #define HW_ACPI_PCIHP_H
 
-#include <inttypes.h>
 #include <qemu/typedefs.h>
 #include "hw/acpi/acpi.h"
 #include "migration/vmstate.h"
diff --git a/include/hw/block/block.h b/include/hw/block/block.h
index 8d7c4b4..984660e 100644
--- a/include/hw/block/block.h
+++ b/include/hw/block/block.h
@@ -12,7 +12,6 @@ 
 #define HW_BLOCK_COMMON_H
 
 #include "qemu-common.h"
-#include "qapi/error.h"
 
 /* Configuration */
 
diff --git a/include/hw/i386/topology.h b/include/hw/i386/topology.h
index 148cc1b..fc95572 100644
--- a/include/hw/i386/topology.h
+++ b/include/hw/i386/topology.h
@@ -38,8 +38,6 @@ 
  *  CPUID Fn8000_0008_ECX[ApicIdCoreIdSize[3:0]] is set to apicid_core_width().
  */
 
-#include <stdint.h>
-#include <string.h>
 
 #include "qemu/bitops.h"
 
diff --git a/include/hw/isa/apm.h b/include/hw/isa/apm.h
index 3edea5f..4839ff1 100644
--- a/include/hw/isa/apm.h
+++ b/include/hw/isa/apm.h
@@ -1,7 +1,6 @@ 
 #ifndef APM_H
 #define APM_H
 
-#include <stdint.h>
 #include "qemu-common.h"
 #include "hw/hw.h"
 #include "exec/memory.h"
diff --git a/include/hw/nvram/fw_cfg.h b/include/hw/nvram/fw_cfg.h
index 664eaf6..5d19975 100644
--- a/include/hw/nvram/fw_cfg.h
+++ b/include/hw/nvram/fw_cfg.h
@@ -2,8 +2,6 @@ 
 #define FW_CFG_H
 
 #ifndef NO_QEMU_PROTOS
-#include <stdint.h>
-#include <stddef.h>
 
 #include "exec/hwaddr.h"
 #include "qemu/typedefs.h"
diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index dedf277..0be07c8 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -6,7 +6,6 @@ 
 #include "hw/qdev.h"
 #include "exec/memory.h"
 #include "sysemu/dma.h"
-#include "qapi/error.h"
 
 /* PCI includes legacy ISA access.  */
 #include "hw/isa/isa.h"
diff --git a/include/hw/pci/shpc.h b/include/hw/pci/shpc.h
index 2c871b9..b208554 100644
--- a/include/hw/pci/shpc.h
+++ b/include/hw/pci/shpc.h
@@ -4,7 +4,6 @@ 
 #include "qemu-common.h"
 #include "exec/memory.h"
 #include "migration/vmstate.h"
-#include "qapi/error.h"
 #include "hw/hotplug.h"
 #include "hw/pci/pci.h"
 
diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index abcdee8..c3ff99f 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -7,7 +7,6 @@ 
 #include "qemu/bitmap.h"
 #include "qom/object.h"
 #include "hw/irq.h"
-#include "qapi/error.h"
 #include "hw/hotplug.h"
 
 enum {
diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h
index c59cc81..d6b012f 100644
--- a/include/hw/virtio/vhost-backend.h
+++ b/include/hw/virtio/vhost-backend.h
@@ -11,7 +11,6 @@ 
 #ifndef VHOST_BACKEND_H_
 #define VHOST_BACKEND_H_
 
-#include <stdbool.h>
 
 typedef enum VhostBackendType {
     VHOST_BACKEND_TYPE_NONE = 0,
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index df33481..bf3fe97 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -6,7 +6,6 @@ 
  *   must not depend on any xen headers being present in
  *   /usr/include/xen, so it can be included unconditionally.
  */
-#include <inttypes.h>
 
 #include "hw/irq.h"
 #include "qemu-common.h"
diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
index 7a3cce0..bd65e67 100644
--- a/include/hw/xen/xen_common.h
+++ b/include/hw/xen/xen_common.h
@@ -1,10 +1,7 @@ 
 #ifndef QEMU_HW_XEN_COMMON_H
 #define QEMU_HW_XEN_COMMON_H 1
 
-#include "config-host.h"
 
-#include <stddef.h>
-#include <inttypes.h>
 
 /*
  * If we have new enough libxenctrl then we do not want/need these compat
diff --git a/include/io/channel.h b/include/io/channel.h
index 3e17fe7..0a1f1ce 100644
--- a/include/io/channel.h
+++ b/include/io/channel.h
@@ -22,7 +22,6 @@ 
 #define QIO_CHANNEL_H__
 
 #include "qemu-common.h"
-#include "qapi/error.h"
 #include "qom/object.h"
 
 #define TYPE_QIO_CHANNEL "qio-channel"
diff --git a/include/io/task.h b/include/io/task.h
index 2418714..2e69d8a 100644
--- a/include/io/task.h
+++ b/include/io/task.h
@@ -22,7 +22,6 @@ 
 #define QIO_TASK_H__
 
 #include "qemu-common.h"
-#include "qapi/error.h"
 #include "qom/object.h"
 
 typedef struct QIOTask QIOTask;
diff --git a/include/libdecnumber/dconfig.h b/include/libdecnumber/dconfig.h
index 2f0455a..0f7dcce 100644
--- a/include/libdecnumber/dconfig.h
+++ b/include/libdecnumber/dconfig.h
@@ -27,7 +27,6 @@ 
    Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.  */
 
-#include "config-host.h"
 
 #if defined(HOST_WORDS_BIGENDIAN)
 #define WORDS_BIGENDIAN 1
diff --git a/include/libdecnumber/decContext.h b/include/libdecnumber/decContext.h
index c3e46f4..01365e2 100644
--- a/include/libdecnumber/decContext.h
+++ b/include/libdecnumber/decContext.h
@@ -56,9 +56,6 @@ 
   #define DECCFULLNAME "Decimal Context Descriptor"   /* Verbose name */
   #define DECCAUTHOR   "Mike Cowlishaw"		      /* Who to blame */
 
-  #include <stdint.h>
-  #include <stdio.h>		   /* for printf, etc.		      */
-  #include <signal.h>		   /* for traps			      */
 
   /* Extended flags setting -- set this to 0 to use only IEEE flags   */
   #define DECEXTFLAG 1		   /* 1=enable extended flags	      */
diff --git a/include/libdecnumber/decNumberLocal.h b/include/libdecnumber/decNumberLocal.h
index 71ed77b..94fb512 100644
--- a/include/libdecnumber/decNumberLocal.h
+++ b/include/libdecnumber/decNumberLocal.h
@@ -42,8 +42,6 @@ 
   #define DECVERSION	"decNumber 3.53" /* Package Version [16 max.] */
   #define DECNLAUTHOR	"Mike Cowlishaw"	      /* Who to blame */
 
-  #include <stdlib.h>	      /* for abs			      */
-  #include <string.h>	      /* for memset, strcpy		      */
   #include "libdecnumber/dconfig.h"
 
   /* Conditional code flag -- set this to match hardware platform     */
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 74684ad..65d47a9 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -18,7 +18,6 @@ 
 #include "qemu-common.h"
 #include "qemu/thread.h"
 #include "qemu/notify.h"
-#include "qapi/error.h"
 #include "migration/vmstate.h"
 #include "qapi-types.h"
 #include "exec/cpu-common.h"
diff --git a/include/migration/qemu-file.h b/include/migration/qemu-file.h
index b5d08d2..3f6b4ed 100644
--- a/include/migration/qemu-file.h
+++ b/include/migration/qemu-file.h
@@ -25,7 +25,6 @@ 
 #define QEMU_FILE_H 1
 #include "exec/cpu-common.h"
 
-#include <stdint.h>
 
 /* This function writes a chunk of data to a file at the given position.
  * The pos argument can be ignored if the file is only being used for
diff --git a/include/net/checksum.h b/include/net/checksum.h
index 2d7a363..7de1acb 100644
--- a/include/net/checksum.h
+++ b/include/net/checksum.h
@@ -18,7 +18,6 @@ 
 #ifndef QEMU_NET_CHECKSUM_H
 #define QEMU_NET_CHECKSUM_H
 
-#include <stdint.h>
 struct iovec;
 
 uint32_t net_checksum_add_cont(int len, uint8_t *buf, int seq);
diff --git a/include/net/eth.h b/include/net/eth.h
index 84384fe..18d0be3 100644
--- a/include/net/eth.h
+++ b/include/net/eth.h
@@ -26,8 +26,6 @@ 
 #ifndef QEMU_ETH_H
 #define QEMU_ETH_H
 
-#include <sys/types.h>
-#include <string.h>
 #include "qemu/bswap.h"
 #include "qemu/iov.h"
 
diff --git a/include/qapi/error.h b/include/qapi/error.h
index e64fe54..02e9dd2 100644
--- a/include/qapi/error.h
+++ b/include/qapi/error.h
@@ -115,9 +115,6 @@ 
 #ifndef ERROR_H
 #define ERROR_H
 
-#include <stdarg.h>
-#include <stdbool.h>
-#include "qemu/compiler.h"
 #include "qapi-types.h"
 
 /*
diff --git a/include/qapi/qmp-event.h b/include/qapi/qmp-event.h
index 8a8ffb5..40fe3cb 100644
--- a/include/qapi/qmp-event.h
+++ b/include/qapi/qmp-event.h
@@ -14,7 +14,6 @@ 
 #ifndef QMP_EVENT_H
 #define QMP_EVENT_H
 
-#include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
 
 typedef void (*QMPEventFuncEmit)(unsigned event, QDict *dict, Error **errp);
diff --git a/include/qapi/qmp/dispatch.h b/include/qapi/qmp/dispatch.h
index e389697..4955209 100644
--- a/include/qapi/qmp/dispatch.h
+++ b/include/qapi/qmp/dispatch.h
@@ -16,7 +16,6 @@ 
 
 #include "qapi/qmp/qobject.h"
 #include "qapi/qmp/qdict.h"
-#include "qapi/error.h"
 
 typedef void (QmpCommandFunc)(QDict *, QObject **, Error **);
 
diff --git a/include/qapi/qmp/json-lexer.h b/include/qapi/qmp/json-lexer.h
index cb456d5..afee782 100644
--- a/include/qapi/qmp/json-lexer.h
+++ b/include/qapi/qmp/json-lexer.h
@@ -14,7 +14,6 @@ 
 #ifndef QEMU_JSON_LEXER_H
 #define QEMU_JSON_LEXER_H
 
-#include "glib-compat.h"
 
 typedef enum json_token_type {
     JSON_MIN = 100,
diff --git a/include/qapi/qmp/json-parser.h b/include/qapi/qmp/json-parser.h
index fea89f8..9987f8c 100644
--- a/include/qapi/qmp/json-parser.h
+++ b/include/qapi/qmp/json-parser.h
@@ -16,7 +16,6 @@ 
 
 #include "qemu-common.h"
 #include "qapi/qmp/qlist.h"
-#include "qapi/error.h"
 
 QObject *json_parser_parse(GQueue *tokens, va_list *ap);
 QObject *json_parser_parse_err(GQueue *tokens, va_list *ap, Error **errp);
diff --git a/include/qapi/qmp/json-streamer.h b/include/qapi/qmp/json-streamer.h
index 09b3d3e..00d8a23 100644
--- a/include/qapi/qmp/json-streamer.h
+++ b/include/qapi/qmp/json-streamer.h
@@ -14,8 +14,6 @@ 
 #ifndef QEMU_JSON_STREAMER_H
 #define QEMU_JSON_STREAMER_H
 
-#include <stdint.h>
-#include "glib-compat.h"
 #include "qapi/qmp/json-lexer.h"
 
 typedef struct JSONToken {
diff --git a/include/qapi/qmp/qbool.h b/include/qapi/qmp/qbool.h
index 836d078..a41111c 100644
--- a/include/qapi/qmp/qbool.h
+++ b/include/qapi/qmp/qbool.h
@@ -14,7 +14,6 @@ 
 #ifndef QBOOL_H
 #define QBOOL_H
 
-#include <stdbool.h>
 #include "qapi/qmp/qobject.h"
 
 typedef struct QBool {
diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h
index 6c2a0e5..71b8eb0 100644
--- a/include/qapi/qmp/qdict.h
+++ b/include/qapi/qmp/qdict.h
@@ -16,8 +16,6 @@ 
 #include "qapi/qmp/qobject.h"
 #include "qapi/qmp/qlist.h"
 #include "qemu/queue.h"
-#include <stdbool.h>
-#include <stdint.h>
 
 #define QDICT_BUCKET_MAX 512
 
diff --git a/include/qapi/qmp/qfloat.h b/include/qapi/qmp/qfloat.h
index a8af2a8..b5d1583 100644
--- a/include/qapi/qmp/qfloat.h
+++ b/include/qapi/qmp/qfloat.h
@@ -14,7 +14,6 @@ 
 #ifndef QFLOAT_H
 #define QFLOAT_H
 
-#include <stdint.h>
 #include "qapi/qmp/qobject.h"
 
 typedef struct QFloat {
diff --git a/include/qapi/qmp/qint.h b/include/qapi/qmp/qint.h
index 049e528..3aaff76 100644
--- a/include/qapi/qmp/qint.h
+++ b/include/qapi/qmp/qint.h
@@ -13,7 +13,6 @@ 
 #ifndef QINT_H
 #define QINT_H
 
-#include <stdint.h>
 #include "qapi/qmp/qobject.h"
 
 typedef struct QInt {
diff --git a/include/qapi/qmp/qjson.h b/include/qapi/qmp/qjson.h
index ee4d31a..02b1f2c 100644
--- a/include/qapi/qmp/qjson.h
+++ b/include/qapi/qmp/qjson.h
@@ -14,8 +14,6 @@ 
 #ifndef QJSON_H
 #define QJSON_H
 
-#include <stdarg.h>
-#include "qemu/compiler.h"
 #include "qapi/qmp/qobject.h"
 #include "qapi/qmp/qstring.h"
 
diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h
index 74459ae..b8ddbca 100644
--- a/include/qapi/qmp/qobject.h
+++ b/include/qapi/qmp/qobject.h
@@ -32,8 +32,6 @@ 
 #ifndef QOBJECT_H
 #define QOBJECT_H
 
-#include <stddef.h>
-#include <assert.h>
 #include "qapi-types.h"
 
 struct QObject {
diff --git a/include/qapi/qmp/qstring.h b/include/qapi/qmp/qstring.h
index df7df55..10076b7 100644
--- a/include/qapi/qmp/qstring.h
+++ b/include/qapi/qmp/qstring.h
@@ -13,7 +13,6 @@ 
 #ifndef QSTRING_H
 #define QSTRING_H
 
-#include <stdint.h>
 #include "qapi/qmp/qobject.h"
 
 typedef struct QString {
diff --git a/include/qapi/visitor-impl.h b/include/qapi/visitor-impl.h
index ea252f8..5b6238ad 100644
--- a/include/qapi/visitor-impl.h
+++ b/include/qapi/visitor-impl.h
@@ -12,7 +12,6 @@ 
 #ifndef QAPI_VISITOR_IMPL_H
 #define QAPI_VISITOR_IMPL_H
 
-#include "qapi/error.h"
 #include "qapi/visitor.h"
 
 struct Visitor
diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h
index 5e581dc..5aa0f58 100644
--- a/include/qapi/visitor.h
+++ b/include/qapi/visitor.h
@@ -16,8 +16,6 @@ 
 
 #include "qemu/typedefs.h"
 #include "qapi/qmp/qobject.h"
-#include "qapi/error.h"
-#include <stdlib.h>
 
 typedef struct GenericList
 {
diff --git a/include/qemu-common.h b/include/qemu-common.h
index f557be7..a85e9bf 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -12,7 +12,6 @@ 
 #ifndef QEMU_COMMON_H
 #define QEMU_COMMON_H
 
-#include "qemu/osdep.h"
 #include "qemu/typedefs.h"
 #include "qemu/fprintf-fn.h"
 
diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h
index 05b447c..8f1d8d9 100644
--- a/include/qemu/atomic.h
+++ b/include/qemu/atomic.h
@@ -15,7 +15,6 @@ 
 #ifndef __QEMU_ATOMIC_H
 #define __QEMU_ATOMIC_H 1
 
-#include "qemu/compiler.h"
 
 
 /* Compiler barrier */
diff --git a/include/qemu/bitmap.h b/include/qemu/bitmap.h
index 86dd9cd..0e33fa5 100644
--- a/include/qemu/bitmap.h
+++ b/include/qemu/bitmap.h
@@ -13,10 +13,7 @@ 
 #define BITMAP_H
 
 #include <glib.h>
-#include <string.h>
-#include <stdlib.h>
 
-#include "qemu/osdep.h"
 #include "qemu/bitops.h"
 
 /*
diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h
index 8164225..755fdd1 100644
--- a/include/qemu/bitops.h
+++ b/include/qemu/bitops.h
@@ -12,8 +12,6 @@ 
 #ifndef BITOPS_H
 #define BITOPS_H
 
-#include <stdint.h>
-#include <assert.h>
 
 #include "host-utils.h"
 #include "atomic.h"
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index 07d88de..95071ba 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -1,15 +1,10 @@ 
 #ifndef BSWAP_H
 #define BSWAP_H
 
-#include "config-host.h"
-#include <inttypes.h>
-#include <limits.h>
-#include <string.h>
 #include "fpu/softfloat.h"
 
 #ifdef CONFIG_MACHINE_BSWAP_H
 # include <sys/endian.h>
-# include <sys/types.h>
 # include <machine/bswap.h>
 #elif defined(__FreeBSD__)
 # include <sys/endian.h>
diff --git a/include/qemu/compatfd.h b/include/qemu/compatfd.h
index fc37915..aa12ee9 100644
--- a/include/qemu/compatfd.h
+++ b/include/qemu/compatfd.h
@@ -14,7 +14,6 @@ 
 #ifndef QEMU_COMPATFD_H
 #define QEMU_COMPATFD_H
 
-#include <signal.h>
 
 struct qemu_signalfd_siginfo {
     uint32_t ssi_signo;   /* Signal number */
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index c5fbe28..8f1cc7b 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -3,7 +3,6 @@ 
 #ifndef COMPILER_H
 #define COMPILER_H
 
-#include "config-host.h"
 
 /*----------------------------------------------------------------------------
 | The macro QEMU_GNUC_PREREQ tests for minimum version of the GNU C compiler.
diff --git a/include/qemu/config-file.h b/include/qemu/config-file.h
index d4ba20e..3b8ecb0 100644
--- a/include/qemu/config-file.h
+++ b/include/qemu/config-file.h
@@ -1,9 +1,7 @@ 
 #ifndef QEMU_CONFIG_H
 #define QEMU_CONFIG_H
 
-#include <stdio.h>
 #include "qemu/option.h"
-#include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
 
 QemuOptsList *qemu_find_opts(const char *group);
diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h
index 20c027a..99b9398 100644
--- a/include/qemu/coroutine.h
+++ b/include/qemu/coroutine.h
@@ -15,7 +15,6 @@ 
 #ifndef QEMU_COROUTINE_H
 #define QEMU_COROUTINE_H
 
-#include <stdbool.h>
 #include "qemu/typedefs.h"
 #include "qemu/queue.h"
 #include "qemu/timer.h"
diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h
index 7ab2355..7a2a363 100644
--- a/include/qemu/error-report.h
+++ b/include/qemu/error-report.h
@@ -13,9 +13,6 @@ 
 #ifndef QEMU_ERROR_H
 #define QEMU_ERROR_H
 
-#include <stdarg.h>
-#include <stdbool.h>
-#include "qemu/compiler.h"
 
 typedef struct Location {
     /* all members are private to qemu-error.c */
diff --git a/include/qemu/fprintf-fn.h b/include/qemu/fprintf-fn.h
index 9ddc90f..b6bad35 100644
--- a/include/qemu/fprintf-fn.h
+++ b/include/qemu/fprintf-fn.h
@@ -8,8 +8,6 @@ 
 #ifndef QEMU_FPRINTF_FN_H
 #define QEMU_FPRINTF_FN_H 1
 
-#include "qemu/compiler.h"
-#include <stdio.h>
 
 typedef int (*fprintf_function)(FILE *f, const char *fmt, ...)
     GCC_FMT_ATTR(2, 3);
diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h
index bb94a00..e29188c 100644
--- a/include/qemu/hbitmap.h
+++ b/include/qemu/hbitmap.h
@@ -12,9 +12,6 @@ 
 #ifndef HBITMAP_H
 #define HBITMAP_H 1
 
-#include <limits.h>
-#include <stdint.h>
-#include <stdbool.h>
 #include "bitops.h"
 #include "host-utils.h"
 
diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h
index 3ef97d5..1cdae0d 100644
--- a/include/qemu/host-utils.h
+++ b/include/qemu/host-utils.h
@@ -25,10 +25,7 @@ 
 #ifndef HOST_UTILS_H
 #define HOST_UTILS_H 1
 
-#include "qemu/compiler.h"   /* QEMU_GNUC_PREREQ */
 #include "qemu/bswap.h"
-#include <limits.h>
-#include <stdbool.h>
 
 #ifdef CONFIG_INT128
 static inline void mulu64(uint64_t *plow, uint64_t *phigh,
diff --git a/include/qemu/int128.h b/include/qemu/int128.h
index fb782aa..c598881 100644
--- a/include/qemu/int128.h
+++ b/include/qemu/int128.h
@@ -1,9 +1,6 @@ 
 #ifndef INT128_H
 #define INT128_H
 
-#include <assert.h>
-#include <stdint.h>
-#include <stdbool.h>
 
 typedef struct Int128 Int128;
 
diff --git a/include/qemu/log.h b/include/qemu/log.h
index 30817f7..1afac63 100644
--- a/include/qemu/log.h
+++ b/include/qemu/log.h
@@ -1,10 +1,6 @@ 
 #ifndef QEMU_LOG_H
 #define QEMU_LOG_H
 
-#include <stdarg.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include "qemu/compiler.h"
 
 /* Private global variables, don't use */
 extern FILE *qemu_logfile;
diff --git a/include/qemu/memfd.h b/include/qemu/memfd.h
index 53858ed..745a8c5 100644
--- a/include/qemu/memfd.h
+++ b/include/qemu/memfd.h
@@ -1,8 +1,6 @@ 
 #ifndef QEMU_MEMFD_H
 #define QEMU_MEMFD_H
 
-#include "config-host.h"
-#include <stdbool.h>
 
 #ifndef F_LINUX_SPECIFIC_BASE
 #define F_LINUX_SPECIFIC_BASE 1024
diff --git a/include/qemu/module.h b/include/qemu/module.h
index 72d9498..85fafa2 100644
--- a/include/qemu/module.h
+++ b/include/qemu/module.h
@@ -14,7 +14,6 @@ 
 #ifndef QEMU_MODULE_H
 #define QEMU_MODULE_H
 
-#include "qemu/osdep.h"
 
 #define DSO_STAMP_FUN         glue(qemu_stamp, CONFIG_STAMP)
 #define DSO_STAMP_FUN_STR     stringify(DSO_STAMP_FUN)
diff --git a/include/qemu/option.h b/include/qemu/option.h
index 71f5f27..8809ce1 100644
--- a/include/qemu/option.h
+++ b/include/qemu/option.h
@@ -26,9 +26,7 @@ 
 #ifndef QEMU_OPTIONS_H
 #define QEMU_OPTIONS_H
 
-#include <stdint.h>
 #include "qemu/queue.h"
-#include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
 #include "qemu/typedefs.h"
 
diff --git a/include/qemu/range.h b/include/qemu/range.h
index cfa021f..9fc547b 100644
--- a/include/qemu/range.h
+++ b/include/qemu/range.h
@@ -1,7 +1,6 @@ 
 #ifndef QEMU_RANGE_H
 #define QEMU_RANGE_H
 
-#include <inttypes.h>
 #include <qemu/typedefs.h>
 #include "qemu/queue.h"
 
diff --git a/include/qemu/rcu.h b/include/qemu/rcu.h
index 7c7cca7..56d3a68 100644
--- a/include/qemu/rcu.h
+++ b/include/qemu/rcu.h
@@ -23,15 +23,8 @@ 
  * IBM's contributions to this file may be relicensed under LGPLv2 or later.
  */
 
-#include <stdlib.h>
-#include <assert.h>
-#include <limits.h>
-#include <unistd.h>
-#include <stdint.h>
-#include <stdbool.h>
 #include <glib.h>
 
-#include "qemu/compiler.h"
 #include "qemu/thread.h"
 #include "qemu/queue.h"
 #include "qemu/atomic.h"
diff --git a/include/qemu/sockets.h b/include/qemu/sockets.h
index cde2f5e..0be68de 100644
--- a/include/qemu/sockets.h
+++ b/include/qemu/sockets.h
@@ -13,7 +13,6 @@  int inet_aton(const char *cp, struct in_addr *ia);
 
 #else
 
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
@@ -26,7 +25,6 @@  int inet_aton(const char *cp, struct in_addr *ia);
 
 #endif /* !_WIN32 */
 
-#include "qapi/error.h"
 #include "qapi-types.h"
 
 /* misc helpers */
diff --git a/include/qemu/thread.h b/include/qemu/thread.h
index 5114ec8..bdae6df 100644
--- a/include/qemu/thread.h
+++ b/include/qemu/thread.h
@@ -1,8 +1,6 @@ 
 #ifndef __QEMU_THREAD_H
 #define __QEMU_THREAD_H 1
 
-#include <inttypes.h>
-#include <stdbool.h>
 
 typedef struct QemuMutex QemuMutex;
 typedef struct QemuCond QemuCond;
diff --git a/include/qemu/throttle.h b/include/qemu/throttle.h
index d0c98ed..13dae95 100644
--- a/include/qemu/throttle.h
+++ b/include/qemu/throttle.h
@@ -25,7 +25,6 @@ 
 #ifndef THROTTLE_H
 #define THROTTLE_H
 
-#include <stdint.h>
 #include "qemu-common.h"
 #include "qemu/timer.h"
 
diff --git a/include/qemu/timed-average.h b/include/qemu/timed-average.h
index 364bf88..08245e7 100644
--- a/include/qemu/timed-average.h
+++ b/include/qemu/timed-average.h
@@ -25,7 +25,6 @@ 
 #ifndef TIMED_AVERAGE_H
 #define TIMED_AVERAGE_H
 
-#include <stdint.h>
 
 #include "qemu/timer.h"
 
diff --git a/include/qemu/xattr.h b/include/qemu/xattr.h
index f910d96..83cf98c 100644
--- a/include/qemu/xattr.h
+++ b/include/qemu/xattr.h
@@ -18,7 +18,6 @@ 
  * in /usr/include/sys, and don't have ENOATTR.
  */
 
-#include "config-host.h"
 
 #ifdef CONFIG_LIBATTR
 #  include <attr/xattr.h>
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index ff54600..1df7cb4 100644
--- a/include/qom/cpu.h
+++ b/include/qom/cpu.h
@@ -20,7 +20,6 @@ 
 #ifndef QEMU_CPU_H
 #define QEMU_CPU_H
 
-#include <signal.h>
 #include <setjmp.h>
 #include "hw/qdev-core.h"
 #include "disas/bfd.h"
diff --git a/include/qom/object.h b/include/qom/object.h
index 33abce9..eda16df 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -15,11 +15,8 @@ 
 #define QEMU_OBJECT_H
 
 #include <glib.h>
-#include <stdint.h>
-#include <stdbool.h>
 #include "qemu/queue.h"
 #include "qemu/typedefs.h"
-#include "qapi/error.h"
 
 struct TypeImpl;
 typedef struct TypeImpl *Type;
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index ec30331..66c5cf2 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -14,7 +14,6 @@ 
 #define BLOCK_BACKEND_H
 
 #include "qemu/typedefs.h"
-#include "qapi/error.h"
 
 /*
  * TODO Have to include block/block.h for a bunch of block layer
diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index b06a060..16432f3 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -11,7 +11,6 @@ 
 #define BLOCKDEV_H
 
 #include "block/block.h"
-#include "qapi/error.h"
 #include "qemu/queue.h"
 
 void blockdev_mark_auto_del(BlockBackend *blk);
diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h
index efa8b99..b0fbb9b 100644
--- a/include/sysemu/dma.h
+++ b/include/sysemu/dma.h
@@ -10,7 +10,6 @@ 
 #ifndef DMA_H
 #define DMA_H
 
-#include <stdio.h>
 #include "exec/memory.h"
 #include "exec/address-spaces.h"
 #include "hw/hw.h"
diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h
index 1ce4394..a19801d 100644
--- a/include/sysemu/hostmem.h
+++ b/include/sysemu/hostmem.h
@@ -14,7 +14,6 @@ 
 
 #include "sysemu/sysemu.h" /* for MAX_NODES */
 #include "qom/object.h"
-#include "qapi/error.h"
 #include "exec/memory.h"
 #include "qemu/option.h"
 #include "qemu/bitmap.h"
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index 7741f91..6695fa7 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -14,8 +14,6 @@ 
 #ifndef QEMU_KVM_H
 #define QEMU_KVM_H
 
-#include <errno.h>
-#include "config-host.h"
 #include "qemu/queue.h"
 #include "qom/cpu.h"
 #include "exec/memattrs.h"
diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h
index a6392bc..bb184c9 100644
--- a/include/sysemu/numa.h
+++ b/include/sysemu/numa.h
@@ -1,7 +1,6 @@ 
 #ifndef SYSEMU_NUMA_H
 #define SYSEMU_NUMA_H
 
-#include <stdint.h>
 #include "qemu/bitmap.h"
 #include "qemu/option.h"
 #include "sysemu/sysemu.h"
diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h
index f131521..5b9c4d6 100644
--- a/include/sysemu/os-posix.h
+++ b/include/sysemu/os-posix.h
@@ -26,7 +26,6 @@ 
 #ifndef QEMU_OS_POSIX_H
 #define QEMU_OS_POSIX_H
 
-#include <sys/time.h>
 
 void os_set_line_buffering(void);
 void os_set_proc_name(const char *s);
diff --git a/include/sysemu/qtest.h b/include/sysemu/qtest.h
index 05473b7..70aa40a 100644
--- a/include/sysemu/qtest.h
+++ b/include/sysemu/qtest.h
@@ -15,7 +15,6 @@ 
 #define QTEST_H
 
 #include "qemu-common.h"
-#include "qapi/error.h"
 
 extern bool qtest_allowed;
 
diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h
index abb4688..e4108e8 100644
--- a/include/sysemu/replay.h
+++ b/include/sysemu/replay.h
@@ -12,10 +12,7 @@ 
  *
  */
 
-#include <stdbool.h>
-#include <stdint.h>
 #include "qapi-types.h"
-#include "qapi/error.h"
 #include "qemu/typedefs.h"
 
 /* replay clock kinds */
diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h
index 0a27c9b..858be8c 100644
--- a/include/sysemu/rng.h
+++ b/include/sysemu/rng.h
@@ -15,7 +15,6 @@ 
 
 #include "qom/object.h"
 #include "qemu-common.h"
-#include "qapi/error.h"
 
 #define TYPE_RNG_BACKEND "rng-backend"
 #define RNG_BACKEND(obj) \
diff --git a/include/sysemu/seccomp.h b/include/sysemu/seccomp.h
index 1189fa2..cfc0600 100644
--- a/include/sysemu/seccomp.h
+++ b/include/sysemu/seccomp.h
@@ -16,7 +16,6 @@ 
 #define QEMU_SECCOMP_H
 
 #include <seccomp.h>
-#include "qemu/osdep.h"
 
 int seccomp_start(void);
 #endif
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index 0a366be..e3ec800 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -15,7 +15,6 @@ 
 
 #include "qom/object.h"
 #include "qemu-common.h"
-#include "qapi/error.h"
 #include "qapi-types.h"
 #include "qemu/option.h"
 #include "sysemu/tpm.h"
diff --git a/include/sysemu/xen-mapcache.h b/include/sysemu/xen-mapcache.h
index c598040..c849489 100644
--- a/include/sysemu/xen-mapcache.h
+++ b/include/sysemu/xen-mapcache.h
@@ -9,7 +9,6 @@ 
 #ifndef XEN_MAPCACHE_H
 #define XEN_MAPCACHE_H
 
-#include <stdlib.h>
 
 typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr start_addr,
                                                      ram_addr_t size,
diff --git a/include/ui/console.h b/include/ui/console.h
index c8f9f7e..6631b96 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -7,7 +7,6 @@ 
 #include "qemu/notify.h"
 #include "qemu/typedefs.h"
 #include "qapi-types.h"
-#include "qapi/error.h"
 
 #ifdef CONFIG_OPENGL
 # include <epoxy/gl.h>
diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
index f9ce357..2dabe49 100644
--- a/include/ui/qemu-spice.h
+++ b/include/ui/qemu-spice.h
@@ -18,7 +18,6 @@ 
 #ifndef QEMU_SPICE_H
 #define QEMU_SPICE_H
 
-#include "config-host.h"
 
 #ifdef CONFIG_SPICE