From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34086) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrU5f-0000VZ-14 for qemu-devel@nongnu.org; Wed, 18 Jul 2012 09:14:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrU5Y-0004au-QY for qemu-devel@nongnu.org; Wed, 18 Jul 2012 09:14:54 -0400 Received: from cantor2.suse.de ([195.135.220.15]:58145 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrU5Y-0004ai-Fx for qemu-devel@nongnu.org; Wed, 18 Jul 2012 09:14:48 -0400 Message-ID: <5006B6C4.8020503@suse.de> Date: Wed, 18 Jul 2012 15:14:44 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1342383931-11594-1-git-send-email-vapier@gentoo.org> <201207151754.08786.vapier@gentoo.org> <5003A61A.7080500@weilnetz.de> <201207180813.38326.vapier@gentoo.org> In-Reply-To: <201207180813.38326.vapier@gentoo.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] cpu-defs.h: pull in qemu-common.h for HOST_LONG_BITS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mike Frysinger Cc: Stefan Weil , qemu-devel@nongnu.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 18.07.2012 14:13, schrieb Mike Frysinger: > On Monday 16 July 2012 01:26:50 Stefan Weil wrote: >> Am 15.07.2012 23:54, schrieb Mike Frysinger: >>> On Sunday 15 July 2012 15:34:33 Stefan Weil wrote: >>>> Am 15.07.2012 22:25, schrieb Mike Frysinger: >>>>> This file uses the define HOST_LONG_BITS, but doesn't >>>>> explicitly include qemu-common.h for it leading to build >>>>> warnings for some setups: In file included from >>>>> qemu/target-bfin/cpu.h:17, >>>>>=20 >>>>> from qemu/cputlb.c:21: qemu/cpu-defs.h:83:5: warning: >>>>> "HOST_LONG_BITS" is not defined >>>>>=20 >>>>> Signed-off-by: Mike Frysinger --- >>>>>=20 >>>>> cpu-defs.h | 1 + 1 file changed, 1 insertion(+) >>>>>=20 >>>>> diff --git a/cpu-defs.h b/cpu-defs.h index f49e950..0d6018d >>>>> 100644 --- a/cpu-defs.h +++ b/cpu-defs.h @@ -28,6 +28,7 @@ >>>>>=20 >>>>> #include #include #include >>>>> "osdep.h" >>>>>=20 >>>>> +#include "qemu-common.h" >>>>>=20 >>>>> #include "qemu-queue.h" #include "targphys.h" >>>>=20 >>>> No. Of course this works, but I don't think that it is >>>> reasonable to include qemu-common.h in every *.h file. There >>>> are already too many of them. >>>>=20 >>>> target-bfin/cpu.h should start like all other cpu.h files >>>> with >>>=20 >>>> these include statements: >>> sorry, but that's fragile junk. if a header file uses defines >>> from another header file, it should be including it. -mike >>=20 >> There are different ways how things can be done. >>=20 >> Normally, I agree with you that each header file should be >> complete, but that's not the QEMU style. >>=20 >> In your special case, it's more important to keep all */cpu.h >> similar. qemu/target-bfin/cpu.h is still not part of the official >> QEMU code, so it can be fixed before it is committed. >=20 > a lot of existing files in the top level pull in qemu-common.h. i > don't think this is a special case considering it's the first > failure i've seen since i started the Blackfin port over a year > ago. Long-term the cpu-defs.h header should go away, so moving stuff into it and dropping it elsewhere seems not the best of ideas. qemu-common.h includes cpu.h under some circumstances, which will include cpu-defs.h, so a circular dependency, not a good idea either. CPU is pretty tricky terrain. I've been working on improving it but progress is slow because a solution for one thing tends to conflict with someone else's work... Andreas - --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (GNU/Linux) iQIcBAEBAgAGBQJQBrbEAAoJEPou0S0+fgE/WdYP/RMYVj96Rig55BaByc6G0T8w iBFJ9WcALzna9pAtjkj716K9nsEGxF5/s8Z3t7MpCznMdZbeQeKko2pJeB0fbqqg 9Gj7ErpkHBQvo4v4UQ99MX2/cmqfDjAZ8a25GK0KP9MW32uqFK2mUOSt7f9nKyMm HtJKRhdsTrO0x3zm5i+A3jEyMmbduU0WKB8bwIk6xiwmVRbqRvc/M2RqOyG9WnFf LRJpNm7yXJlzShcmaNbtl7+DyUN6CX4cGUQ85l7gRrzpRQIJrGjMOJqwhdQotvRc r02AgzLaQHVn26mTFT+LvUVIOhNMH/+uaDITmMdUyumcytAZAu17EhgWir/qtNNq rQe82UVSghW6Os6oS/NR+8UOAfpgWGaUra1xxoiJIO+h+OO0smx2yLSicaKR6n1R isGAx8KaSI/ypCdECZu14U2bnysYUUeGnpXAOqcx/gh+LP2riE2qT5qf22799+U2 lpgb+Vodfq6u4+xThU3aoRtWXMU+5nHnsx++6FZdgjzdesJgYdBuIfG1IH2prOdO 8Q1JVMndDwsRYiXJ9MB/v7e9kEo6JqqZA+V2hHLVmmP9SMuiCUEWzxwfYqKyryuA eJw2MRHF0Bx68mAmqMfiU+TY6xogpG0sUrLkchoFKuTwpF4HEDBBiN/3ciMSpnak kWYgVZrUpL7jDaEQsSZl =3Dx1X7 -----END PGP SIGNATURE-----