Move include qemu/option.h from qemu-common.h to actual users

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 <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180201111846.21846-20-armbru@redhat.com>
[Semantic conflict with commit bdd6a90a9e in block/nvme.c resolved]
This commit is contained in:
Markus Armbruster 2018-02-01 12:18:46 +01:00
parent bbcad965bf
commit 922a01a013
104 changed files with 99 additions and 54 deletions

View file

@ -4,7 +4,6 @@
#include "block/aio.h"
#include "qapi-types.h"
#include "qemu/iov.h"
#include "qemu/option.h"
#include "qemu/coroutine.h"
#include "block/accounting.h"
#include "block/dirty-bitmap.h"

View file

@ -26,7 +26,6 @@
#include "block/accounting.h"
#include "block/block.h"
#include "qemu/option.h"
#include "qemu/queue.h"
#include "qemu/coroutine.h"
#include "qemu/stats64.h"

View file

@ -21,8 +21,6 @@
#define NBD_H
#include "qemu-common.h"
#include "qemu/option.h"
#include "io/channel-socket.h"
#include "crypto/tlscreds.h"

View file

@ -25,8 +25,6 @@
#ifndef SNAPSHOT_H
#define SNAPSHOT_H
#include "qemu-common.h"
#include "qemu/option.h"
#define SNAPSHOT_OPT_BASE "snapshot."

View file

@ -1,8 +1,6 @@
#ifndef QEMU_CHAR_H
#define QEMU_CHAR_H
#include "qemu-common.h"
#include "qemu/option.h"
#include "qemu/main-loop.h"
#include "qemu/bitmap.h"
#include "qom/object.h"

View file

@ -21,7 +21,6 @@
*/
#include "qemu/notify.h"
#include "qemu/option.h"
#include "exec/memory.h"
#include "hw/irq.h"
#include "hw/acpi/acpi_dev_interface.h"

View file

@ -2,7 +2,6 @@
#define QDEV_CORE_H
#include "qemu/queue.h"
#include "qemu/option.h"
#include "qemu/bitmap.h"
#include "qom/object.h"
#include "hw/irq.h"

View file

@ -14,7 +14,6 @@
*
*/
#include "qemu/option.h"
#define SMBIOS_MAX_TYPE 127

View file

@ -2,9 +2,7 @@
#define QEMU_NET_H
#include "qemu/queue.h"
#include "qemu-common.h"
#include "qapi-types.h"
#include "qemu/option.h"
#include "net/queue.h"
#include "migration/vmstate.h"

View file

@ -24,8 +24,6 @@
#ifndef QEMU_NET_SLIRP_H
#define QEMU_NET_SLIRP_H
#include "qemu-common.h"
#include "qemu/option.h"
#ifdef CONFIG_SLIRP

View file

@ -14,7 +14,6 @@
#define OPTS_VISITOR_H
#include "qapi/visitor.h"
#include "qemu/option.h"
/* Inclusive upper bound on the size of any flattened range. This is a safety
* (= anti-annoyance) measure; wrong ranges should not cause long startup

View file

@ -16,8 +16,6 @@
#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
#include "qemu/option.h"
/* Copyright string for -version arguments, About dialogs, etc */
#define QEMU_COPYRIGHT "Copyright (c) 2003-2017 " \
"Fabrice Bellard and the QEMU Project developers"

View file

@ -1,7 +1,6 @@
#ifndef QEMU_CONFIG_FILE_H
#define QEMU_CONFIG_FILE_H
#include "qemu/option.h"
QemuOptsList *qemu_find_opts(const char *group);
QemuOptsList *qemu_find_opts_err(const char *group, Error **errp);

View file

@ -2,7 +2,6 @@
#define QEMU_ARCH_INIT_H
#include "qapi-types.h"
#include "qemu/option.h"
enum {
QEMU_ARCH_ALL = -1,

View file

@ -16,7 +16,6 @@
#include "sysemu/sysemu.h" /* for MAX_NODES */
#include "qom/object.h"
#include "exec/memory.h"
#include "qemu/option.h"
#include "qemu/bitmap.h"
#define TYPE_MEMORY_BACKEND "memory-backend"

View file

@ -2,7 +2,6 @@
#define SYSEMU_NUMA_H
#include "qemu/bitmap.h"
#include "qemu/option.h"
#include "sysemu/sysemu.h"
#include "sysemu/hostmem.h"
#include "hw/boards.h"

View file

@ -2,7 +2,6 @@
#define SYSEMU_H
/* Misc. things related to the system emulator. */
#include "qemu/option.h"
#include "qemu/queue.h"
#include "qemu/timer.h"
#include "qemu/notify.h"

View file

@ -23,7 +23,6 @@
#ifdef CONFIG_SPICE
#include <spice.h>
#include "qemu/option.h"
#include "qemu/config-file.h"
extern int using_spice;