[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers |
Date: |
Tue, 15 Mar 2016 17:35:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
"Daniel P. Berrange" <address@hidden> writes:
> On Tue, Mar 15, 2016 at 04:03:40PM +0100, Markus Armbruster wrote:
>> 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."
>>
>> We include it in many headers anyway. Fix that.
>>
>> Dropping these ill-advised includes requires including
>> qemu/fprintf-fn.h, cpu.h or exec/hwaddr.h instead in a few headers
>> that actually need those, and of course including qemu-common.h in .c
>> files that need it, except some of them need only qemu/module.h.
>>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>> crypto/secret.c | 1 +
>> crypto/tlscreds.c | 1 +
>> crypto/tlscredsanon.c | 1 +
>> crypto/tlscredsx509.c | 1 +
>
>
>> diff --git a/crypto/secret.c b/crypto/secret.c
>> index 285ab7a..65929ac 100644
>> --- a/crypto/secret.c
>> +++ b/crypto/secret.c
>> @@ -19,6 +19,7 @@
>> */
>>
>> #include "qemu/osdep.h"
>> +#include "qemu/module.h"
>> #include "crypto/secret.h"
>> #include "crypto/cipher.h"
>> #include "qapi/error.h"
>> diff --git a/crypto/tlscreds.c b/crypto/tlscreds.c
>> index 1620e12..edc7f88 100644
>> --- a/crypto/tlscreds.c
>> +++ b/crypto/tlscreds.c
>> @@ -20,6 +20,7 @@
>>
>> #include "qemu/osdep.h"
>> #include "qapi/error.h"
>> +#include "qemu/module.h"
>> #include "crypto/tlscredspriv.h"
>> #include "trace.h"
>>
>> diff --git a/crypto/tlscredsanon.c b/crypto/tlscredsanon.c
>> index 1464220..50df4f0 100644
>> --- a/crypto/tlscredsanon.c
>> +++ b/crypto/tlscredsanon.c
>> @@ -19,6 +19,7 @@
>> */
>>
>> #include "qemu/osdep.h"
>> +#include "qemu/module.h"
>> #include "crypto/tlscredsanon.h"
>> #include "crypto/tlscredspriv.h"
>> #include "qapi/error.h"
>> diff --git a/crypto/tlscredsx509.c b/crypto/tlscredsx509.c
>> index 6a0179c..2709b2b 100644
>> --- a/crypto/tlscredsx509.c
>> +++ b/crypto/tlscredsx509.c
>> @@ -19,6 +19,7 @@
>> */
>>
>> #include "qemu/osdep.h"
>> +#include "qemu/module.h"
>> #include "crypto/tlscredsx509.h"
>> #include "crypto/tlscredspriv.h"
>> #include "crypto/secret.h"
>
> It feels like these should be in the previous patch that removes
> qemu-common.h from the include/crypto files ?
They aren't actually needed then, because qemu/module.h is still
included via some inclusion of qemu-common.h in a header. But I can
certainly move them to the previous patch anyway, if you'd prefer that.
Since we'll probably defer this patch and the next for a bit, I might
prefer it myself :)
- [Qemu-devel] [PATCH 05/15] fw_cfg: Split fw_cfg_keys.h off fw_cfg.h, (continued)
- [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, 2016/03/15
- [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
- Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers, Daniel P. Berrange, 2016/03/15
- Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers, Paolo Bonzini, 2016/03/15
- Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers, Markus Armbruster, 2016/03/15
- Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers, Paolo Bonzini, 2016/03/15
- Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers, Peter Maydell, 2016/03/15
- Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers, Paolo Bonzini, 2016/03/15
- Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers, Peter Maydell, 2016/03/15
- Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers, Markus Armbruster, 2016/03/15
[Qemu-devel] [PATCH 15/15] Drop superfluous qemu-common.h inclusions, Markus Armbruster, 2016/03/15
[Qemu-devel] [PATCH 01/15] include/qemu/osdep.h: Don't include qapi/error.h, Markus Armbruster, 2016/03/15