Skip to content

Commit

Permalink
include: Clean up includes
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Eric Blake <eblake@redhat.com>
  • Loading branch information
pm215 committed Feb 23, 2016
1 parent 974dc73 commit 90ce6e2
Show file tree
Hide file tree
Showing 97 changed files with 0 additions and 156 deletions.
2 changes: 0 additions & 2 deletions include/block/accounting.h
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion include/block/nbd.h
Expand Up @@ -19,7 +19,6 @@
#ifndef NBD_H
#define NBD_H

#include <sys/types.h>

#include "qemu-common.h"
#include "qemu/option.h"
Expand Down
1 change: 0 additions & 1 deletion include/block/snapshot.h
Expand Up @@ -26,7 +26,6 @@
#define SNAPSHOT_H

#include "qemu-common.h"
#include "qapi/error.h"
#include "qemu/option.h"


Expand Down
1 change: 0 additions & 1 deletion include/block/write-threshold.h
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion include/config.h
@@ -1,2 +1 @@
#include "config-host.h"
#include "config-target.h"
1 change: 0 additions & 1 deletion include/crypto/cipher.h
Expand Up @@ -22,7 +22,6 @@
#define QCRYPTO_CIPHER_H__

#include "qemu-common.h"
#include "qapi/error.h"

typedef struct QCryptoCipher QCryptoCipher;

Expand Down
1 change: 0 additions & 1 deletion include/crypto/hash.h
Expand Up @@ -22,7 +22,6 @@
#define QCRYPTO_HASH_H__

#include "qemu-common.h"
#include "qapi/error.h"

/* See also "QCryptoHashAlgorithm" defined in qapi/crypto.json */

Expand Down
1 change: 0 additions & 1 deletion include/crypto/init.h
Expand Up @@ -22,7 +22,6 @@
#define QCRYPTO_INIT_H__

#include "qemu-common.h"
#include "qapi/error.h"

int qcrypto_init(Error **errp);

Expand Down
1 change: 0 additions & 1 deletion include/crypto/secret.h
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion include/crypto/tlscreds.h
Expand Up @@ -22,7 +22,6 @@
#define QCRYPTO_TLSCRED_H__

#include "qemu-common.h"
#include "qapi/error.h"
#include "qom/object.h"

#ifdef CONFIG_GNUTLS
Expand Down
1 change: 0 additions & 1 deletion 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;
Expand Down
1 change: 0 additions & 1 deletion include/exec/cpu-all.h
Expand Up @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions include/exec/cpu-defs.h
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion include/exec/helper-head.h
Expand Up @@ -18,7 +18,6 @@
#ifndef DEF_HELPER_H
#define DEF_HELPER_H 1

#include "qemu/osdep.h"

#define HELPER(name) glue(helper_, name)

Expand Down
3 changes: 0 additions & 3 deletions include/exec/memory.h
Expand Up @@ -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"
Expand All @@ -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"

Expand Down
1 change: 0 additions & 1 deletion include/exec/user/thunk.h
Expand Up @@ -19,7 +19,6 @@
#ifndef THUNK_H
#define THUNK_H

#include <inttypes.h>
#include "cpu.h"

/* types enums definitions */
Expand Down
3 changes: 0 additions & 3 deletions include/fpu/softfloat.h
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion include/hw/acpi/acpi.h
Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions 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. */
Expand Down
2 changes: 0 additions & 2 deletions include/hw/acpi/bios-linker-loader.h
Expand Up @@ -2,8 +2,6 @@
#define BIOS_LINKER_LOADER_H

#include <glib.h>
#include <stdbool.h>
#include <inttypes.h>

GArray *bios_linker_loader_init(void);

Expand Down
1 change: 0 additions & 1 deletion include/hw/acpi/pcihp.h
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion include/hw/block/block.h
Expand Up @@ -12,7 +12,6 @@
#define HW_BLOCK_COMMON_H

#include "qemu-common.h"
#include "qapi/error.h"

/* Configuration */

Expand Down
2 changes: 0 additions & 2 deletions include/hw/i386/topology.h
Expand Up @@ -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"

Expand Down
1 change: 0 additions & 1 deletion 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"
Expand Down
2 changes: 0 additions & 2 deletions include/hw/nvram/fw_cfg.h
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion include/hw/pci/pci.h
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion include/hw/pci/shpc.h
Expand Up @@ -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"

Expand Down
1 change: 0 additions & 1 deletion include/hw/qdev-core.h
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion include/hw/virtio/vhost-backend.h
Expand Up @@ -11,7 +11,6 @@
#ifndef VHOST_BACKEND_H_
#define VHOST_BACKEND_H_

#include <stdbool.h>

typedef enum VhostBackendType {
VHOST_BACKEND_TYPE_NONE = 0,
Expand Down
1 change: 0 additions & 1 deletion include/hw/xen/xen.h
Expand Up @@ -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"
Expand Down
3 changes: 0 additions & 3 deletions 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
Expand Down
1 change: 0 additions & 1 deletion include/io/channel.h
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion include/io/task.h
Expand Up @@ -22,7 +22,6 @@
#define QIO_TASK_H__

#include "qemu-common.h"
#include "qapi/error.h"
#include "qom/object.h"

typedef struct QIOTask QIOTask;
Expand Down
1 change: 0 additions & 1 deletion include/libdecnumber/dconfig.h
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions include/libdecnumber/decContext.h
Expand Up @@ -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 */
Expand Down
2 changes: 0 additions & 2 deletions include/libdecnumber/decNumberLocal.h
Expand Up @@ -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 */
Expand Down
1 change: 0 additions & 1 deletion include/migration/migration.h
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion include/migration/qemu-file.h
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion include/net/checksum.h
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions include/net/eth.h
Expand Up @@ -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"

Expand Down
3 changes: 0 additions & 3 deletions include/qapi/error.h
Expand Up @@ -115,9 +115,6 @@
#ifndef ERROR_H
#define ERROR_H

#include <stdarg.h>
#include <stdbool.h>
#include "qemu/compiler.h"
#include "qapi-types.h"

/*
Expand Down
1 change: 0 additions & 1 deletion include/qapi/qmp-event.h
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion include/qapi/qmp/dispatch.h
Expand Up @@ -16,7 +16,6 @@

#include "qapi/qmp/qobject.h"
#include "qapi/qmp/qdict.h"
#include "qapi/error.h"

typedef void (QmpCommandFunc)(QDict *, QObject **, Error **);

Expand Down
1 change: 0 additions & 1 deletion include/qapi/qmp/json-lexer.h
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion include/qapi/qmp/json-parser.h
Expand Up @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions include/qapi/qmp/json-streamer.h
Expand Up @@ -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 {
Expand Down
1 change: 0 additions & 1 deletion include/qapi/qmp/qbool.h
Expand Up @@ -14,7 +14,6 @@
#ifndef QBOOL_H
#define QBOOL_H

#include <stdbool.h>
#include "qapi/qmp/qobject.h"

typedef struct QBool {
Expand Down

0 comments on commit 90ce6e2

Please sign in to comment.