From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50703) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afrIv-0005Uf-Vc for qemu-devel@nongnu.org; Tue, 15 Mar 2016 11:54:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1afrIs-00072h-Aw for qemu-devel@nongnu.org; Tue, 15 Mar 2016 11:54:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46661) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1afrIs-00072K-5T for qemu-devel@nongnu.org; Tue, 15 Mar 2016 11:54:38 -0400 Date: Tue, 15 Mar 2016 15:54:33 +0000 From: "Daniel P. Berrange" Message-ID: <20160315155433.GG3168@redhat.com> References: <1458054221-16923-1-git-send-email-armbru@redhat.com> <1458054221-16923-15-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-15-git-send-email-armbru@redhat.com> Subject: Re: [Qemu-devel] [PATCH 14/15] Don't include qemu-common.h in headers 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: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 > --- > 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 ? 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 :|