[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 06/29] include/hw/hw.h: Don't include qemu-common.h
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 06/29] include/hw/hw.h: Don't include qemu-common.h |
Date: |
Tue, 22 Mar 2016 15:16:46 +0100 |
From: Markus Armbruster <address@hidden>
qemu-common.h should only be included by .c files. Its file comment
explains why: "No header file should depend on qemu-common.h, as this
would easily lead to circular header dependencies."
hw/hw.h includes qemu-common.h, but its users generally need only
hw_error() and qemu/module.h from it. Move the former to hw/hw.h,
include the latter there, and drop the ill-advised include.
hw/misc/cbus.c now misses hw_error(), so include hw/hw.h there.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
hw/misc/cbus.c | 2 +-
include/hw/hw.h | 4 +++-
include/qemu-common.h | 4 ----
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/hw/misc/cbus.c b/hw/misc/cbus.c
index fafe070..0c207e3 100644
--- a/hw/misc/cbus.c
+++ b/hw/misc/cbus.c
@@ -21,7 +21,7 @@
*/
#include "qemu/osdep.h"
-#include "qemu-common.h"
+#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/devices.h"
#include "sysemu/sysemu.h"
diff --git a/include/hw/hw.h b/include/hw/hw.h
index cd3d410..2cb69d5 100644
--- a/include/hw/hw.h
+++ b/include/hw/hw.h
@@ -2,7 +2,6 @@
#ifndef QEMU_HW_H
#define QEMU_HW_H
-#include "qemu-common.h"
#if !defined(CONFIG_USER_ONLY) && !defined(NEED_CPU_H)
#include "exec/cpu-common.h"
@@ -13,6 +12,7 @@
#include "block/aio.h"
#include "migration/vmstate.h"
#include "qemu/log.h"
+#include "qemu/module.h"
#ifdef NEED_CPU_H
#if TARGET_LONG_BITS == 64
@@ -41,6 +41,8 @@ typedef void QEMUResetHandler(void *opaque);
void qemu_register_reset(QEMUResetHandler *func, void *opaque);
void qemu_unregister_reset(QEMUResetHandler *func, void *opaque);
+void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
+
#ifdef NEED_CPU_H
#if TARGET_LONG_BITS == 64
#define VMSTATE_UINTTL_V(_f, _s, _v) \
diff --git a/include/qemu-common.h b/include/qemu-common.h
index b8fbd9e..ba37968 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -303,10 +303,6 @@ int qemu_openpty_raw(int *aslave, char *pty_name);
sendto(sockfd, buf, len, flags, destaddr, addrlen)
#endif
-/* Error handling. */
-
-void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
-
struct ParallelIOArg {
void *buffer;
int count;
--
2.5.0
- [Qemu-devel] [PULL 00/29] Miscellaneous changes for 2016-03-22, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 02/29] Use scripts/clean-includes to drop redundant qemu/typedefs.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 03/29] Clean up includes some more, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 08/29] Move HOST_LONG_BITS from qemu-common.h to qemu/osdep.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 04/29] fw_cfg: Split fw_cfg_keys.h off fw_cfg.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 07/29] hw/pci/pci.h: Don't include qemu-common.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 09/29] Move QEMU_ALIGN_*() from qemu-common.h to qemu/osdep.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 11/29] isa: Move DMA_transfer_handler from qemu-common.h to hw/isa/isa.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 05/29] include/qemu/iov.h: Don't include qemu-common.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 06/29] include/hw/hw.h: Don't include qemu-common.h,
Paolo Bonzini <=
- [Qemu-devel] [PULL 10/29] Move ParallelIOArg from qemu-common.h to sysemu/char.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 12/29] include/crypto: Include qapi-types.h or qemu/bswap.h instead of qemu-common.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 13/29] hw: explicitly include qemu-common.h and cpu.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 01/29] include/qemu/osdep.h: Don't include qapi/error.h, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 14/29] Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 16/29] tcg: pass down TranslationBlock to tcg_code_gen, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 21/29] qemu-log: dfilter-ise exec, out_asm, op and opt_op, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 18/29] qemu-log: Avoid function call for disabled qemu_log_mask logging, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 20/29] qemu-log: new option -dfilter to limit output, Paolo Bonzini, 2016/03/22
- [Qemu-devel] [PULL 19/29] qemu-log: Improve the "exec" TB execution logging, Paolo Bonzini, 2016/03/22