Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx>
- Subject: Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- From: Ingo Molnar <mingo@xxxxxxx>
- Date: Fri, 6 Feb 2009 17:33:14 +0100
- Cc: Jaswinder Singh Rajput <jaswinder@xxxxxxxxxx>, KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>, Jaswinder Singh Rajput <jaswinderlinux@xxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Sam Ravnborg <sam@xxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, hskinnemoen@xxxxxxxxx, cooloney@xxxxxxxxxx, tony.luck@xxxxxxxxx, ralf@xxxxxxxxxxxxxx, dhowells@xxxxxxxxxx, matthew@xxxxxx, chris@xxxxxxxxxx, LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-next <linux-next@xxxxxxxxxxxxxxx>, linux-ia64 <linux-ia64@xxxxxxxxxxxxxxx>
- In-reply-to: <20090206162352.GI13758@xxxxxxxxxxxxxxxxxxxxxx>
- List-id: <linux-ia64.vger.kernel.org>
- References: <20090206164546.6291.KOSAKI.MOTOHIRO@xxxxxxxxxxxxxx> <3f9a31f40902060053x18dacf58u40c739ab89f13860@xxxxxxxxxxxxxx> <20090206180957.6294.KOSAKI.MOTOHIRO@xxxxxxxxxxxxxx> <20090206145556.GH18368@xxxxxxx> <1233934141.3209.20.camel@xxxxxxxxxxxxxxxxxxxxx> <20090206153315.GD13758@xxxxxxxxxxxxxxxxxxxxxx> <1233935328.3209.30.camel@xxxxxxxxxxxxxxxxxxxxx> <20090206155512.GF13758@xxxxxxxxxxxxxxxxxxxxxx> <20090206161229.GA8256@xxxxxxx> <20090206162352.GI13758@xxxxxxxxxxxxxxxxxxxxxx>
- User-agent: Mutt/1.5.18 (2008-05-17)
* Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> wrote:
> On Fri, Feb 06, 2009 at 05:12:29PM +0100, Ingo Molnar wrote:
> >
> > * Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> wrote:
> >
> > > > We cannot see any downside of this patch.
> > > >
> > > > But we can see upside of this patch is:
> > > > 1. No need to protect linux/types.h with #ifndef __ASSEMBLY__ in many
> > > > files
> > > > 2. So we trying to replace multiple #ifndef __ASSEMBLY__ with one.
> > >
> > > The point is:
> > >
> > > 1. If the parent include needs to include linux/types.h to get at C
> > > types _and_ the include file needs to also be included by assembly
> > > code, it itself needs to have #ifndef __ASSEMBLY__ to protect those
> > > uses from the assembly code.
> > >
> > > In that case, the linux/types.h include should be contained within
> > > the #ifndef __ASSEMBLY__ .. #endif block along with all C only
> > > parts of the header file.
> >
> > That makes the code much less clean: putting #include's in the middle of a
> > header is poor style and leads to people failing to consider dependencies.
> > We generally put them to the header portion.
> >
> > Putting an #include line in the middle of a header file is a receipe for a
> > dependency hell (it can easily fall inside #ifdefs, can be overlooked,
> > etc.), so it's _strongly_ discouraged (at least on arch/x86).
>
> Put them at the top then with an additional ifndef.
So you advocate 40 stupid pairs of #ifdefs spread out, instead of a
_single_, obvious #ifdef in a commonly used header?
Case closed.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
- References:
- [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- From: Jaswinder Singh Rajput
- Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- From: Jaswinder Singh Rajput
- Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- From: Russell King - ARM Linux
- Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- From: Jaswinder Singh Rajput
- Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- From: Russell King - ARM Linux
- Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- Re: [linux-next][PATCH] revert headers_check fix: ia64, fpu.h
- From: Russell King - ARM Linux
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]