[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/15] include/crypto: Include qapi-types.h instead
From: |
Markus Armbruster |
Subject: |
[Qemu-devel] [PATCH 13/15] include/crypto: Include qapi-types.h instead of qemu-common.h |
Date: |
Tue, 15 Mar 2016 16:03:39 +0100 |
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."
Several include/crypto/ headers include qemu-common.h, but either need
just qapi-types.h from it, or nothing at all. Replace or drop the
include accordingly. tests/test-crypto-secret.c now misses
qemu/module.h, so include it there.
Signed-off-by: Markus Armbruster <address@hidden>
---
include/crypto/cipher.h | 2 +-
include/crypto/hash.h | 2 +-
include/crypto/init.h | 2 --
include/crypto/secret.h | 1 -
include/crypto/tlscreds.h | 1 -
tests/test-crypto-secret.c | 1 +
6 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/include/crypto/cipher.h b/include/crypto/cipher.h
index c04c3ac..d770c48 100644
--- a/include/crypto/cipher.h
+++ b/include/crypto/cipher.h
@@ -21,7 +21,7 @@
#ifndef QCRYPTO_CIPHER_H__
#define QCRYPTO_CIPHER_H__
-#include "qemu-common.h"
+#include "qapi-types.h"
typedef struct QCryptoCipher QCryptoCipher;
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index aebccd1..f38caed 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -21,7 +21,7 @@
#ifndef QCRYPTO_HASH_H__
#define QCRYPTO_HASH_H__
-#include "qemu-common.h"
+#include "qapi-types.h"
/* See also "QCryptoHashAlgorithm" defined in qapi/crypto.json */
diff --git a/include/crypto/init.h b/include/crypto/init.h
index 4836a37..2513ed0 100644
--- a/include/crypto/init.h
+++ b/include/crypto/init.h
@@ -21,8 +21,6 @@
#ifndef QCRYPTO_INIT_H__
#define QCRYPTO_INIT_H__
-#include "qemu-common.h"
-
int qcrypto_init(Error **errp);
#endif /* QCRYPTO_INIT_H__ */
diff --git a/include/crypto/secret.h b/include/crypto/secret.h
index 60f2a50..b7392c6 100644
--- a/include/crypto/secret.h
+++ b/include/crypto/secret.h
@@ -21,7 +21,6 @@
#ifndef QCRYPTO_SECRET_H__
#define QCRYPTO_SECRET_H__
-#include "qemu-common.h"
#include "qom/object.h"
#define TYPE_QCRYPTO_SECRET "secret"
diff --git a/include/crypto/tlscreds.h b/include/crypto/tlscreds.h
index 4bf1d2e..8e2babd 100644
--- a/include/crypto/tlscreds.h
+++ b/include/crypto/tlscreds.h
@@ -21,7 +21,6 @@
#ifndef QCRYPTO_TLSCRED_H__
#define QCRYPTO_TLSCRED_H__
-#include "qemu-common.h"
#include "qom/object.h"
#ifdef CONFIG_GNUTLS
diff --git a/tests/test-crypto-secret.c b/tests/test-crypto-secret.c
index 43e2952..aa26c20 100644
--- a/tests/test-crypto-secret.c
+++ b/tests/test-crypto-secret.c
@@ -24,6 +24,7 @@
#include "crypto/init.h"
#include "crypto/secret.h"
#include "qapi/error.h"
+#include "qemu/module.h"
static void test_secret_direct(void)
{
--
2.4.3
- [Qemu-devel] [PATCH 00/15] Clean up around osdep.h and qemu-common.h, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 03/15] include/config.h: Unused, remove, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 06/15] include/qemu/iov.h: Don't include qemu-common.h, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 04/15] Clean up includes some more, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 02/15] Use scripts/clean-includes to drop redundant qemu/typedefs.h, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 10/15] Move QEMU_ALIGN_*() from qemu-common.h to qemu/osdep.h, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 09/15] Move HOST_LONG_BITS from qemu-common.h to qemu/osdep.h, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 05/15] fw_cfg: Split fw_cfg_keys.h off fw_cfg.h, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 13/15] include/crypto: Include qapi-types.h instead of qemu-common.h,
Markus Armbruster <=
- [Qemu-devel] [PATCH 11/15] Move ParallelIOArg from qemu-common.h to sysemu/char.h, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 07/15] include/hw/hw.h: Don't include qemu-common.h, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 12/15] isa: Move DMA_transfer_handler from qemu-common.h to hw/isa/isa.h, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 08/15] hw/pci/pci.h: Don't include qemu-common.h, Markus Armbruster, 2016/03/15
- [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers, Markus Armbruster, 2016/03/15