From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afrG3-0002EU-K7 for qemu-devel@nongnu.org; Tue, 15 Mar 2016 11:51:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afrFz-0006Nl-Sj for qemu-devel@nongnu.org; Tue, 15 Mar 2016 11:51:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34469) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afrFz-0006Mn-N9 for qemu-devel@nongnu.org; Tue, 15 Mar 2016 11:51:39 -0400 Date: Tue, 15 Mar 2016 15:51:33 +0000 From: "Daniel P. Berrange" Message-ID: <20160315155133.GF3168@redhat.com> References: <1458054221-16923-1-git-send-email-armbru@redhat.com> <1458054221-16923-14-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1458054221-16923-14-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH 13/15] include/crypto: Include qapi-types.h instead of qemu-common.h Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, pbonzini@redhat.com On Tue, Mar 15, 2016 at 04:03:39PM +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." > > 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 > --- > 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); Nothing provides the definition of the 'Error' type now. Needs to add in #include "qapi/error.h" Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|