From: Adrian Bunk <bunk@stusta.de>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-kernel@vger.kernel.org, torvalds@osdl.org, akpm@osdl.org
Subject: Re: RFC: cleaning up the in-kernel headers
Date: Wed, 12 Jul 2006 00:24:00 +0200 [thread overview]
Message-ID: <20060711222400.GE13938@stusta.de> (raw)
In-Reply-To: <1152635323.3373.211.camel@pmac.infradead.org>
On Tue, Jul 11, 2006 at 05:28:43PM +0100, David Woodhouse wrote:
> On Tue, 2006-07-11 at 18:06 +0200, Adrian Bunk wrote:
> > I'd like to cleanup the mess of the in-kernel headers, based on the
> > following rules:
> > - every header should #include everything it uses
> > - remove unneeded #include's from headers
> >
> > This would also remove all the implicit rules "before #include'ing
> > header foo.h, you must #include header bar.h" you usually only see
> > when the compilation fails.
> >
> > There might be exceptions (e.g. for avoiding circular #include's) but
> > these would be special cases.
>
> Seems eminently sensible. Please make sure you don't introduce
> regressions in the output of 'make headers_install' by unconditionally
> including files which don't exist in the export -- if something is only
> _used_ within #ifdef __KERNEL__ then it should only be #included within
> #ifdef __KERNEL__ too.
Sure, I have the userspace headers in mind, too.
> It would be nice in the general case if we could actually _compile_ each
> header file, standalone. There may be some cases where that doesn't
> work, but it's a useful goal in most cases, for bother exported headers
> _and_ the in-kernel version. For the former case it would be nice to add
> it to 'make headers_check' once it's realistic to do so.
That's what I meant with "every header should #include everything it
uses".
Unfortunately, compiling alone is not enough due to:
- different config options affecting a header
- code only used in a #define
I got a problem caused by the combination of both just a few days ago...
>...
> dwmw2
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2006-07-11 22:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-11 16:06 RFC: cleaning up the in-kernel headers Adrian Bunk
2006-07-11 16:28 ` David Woodhouse
2006-07-11 17:33 ` Christoph Hellwig
2006-07-11 19:34 ` Sam Ravnborg
2006-07-11 19:41 ` Sam Ravnborg
2006-07-11 20:41 ` Randy.Dunlap
2006-07-11 21:37 ` Jörn Engel
2006-07-11 22:01 ` H. Peter Anvin
2006-07-11 22:20 ` Jörn Engel
2006-07-11 22:39 ` Linus Torvalds
2006-07-11 22:40 ` Adrian Bunk
2006-07-11 21:04 ` David Woodhouse
2006-07-11 22:24 ` Adrian Bunk [this message]
2006-07-11 17:07 ` Dave Jones
2006-07-11 17:15 ` Joshua Hudson
2006-07-11 18:19 ` Dave Jones
2006-07-11 22:27 ` Adrian Bunk
2006-07-11 19:05 ` Russell King
2006-07-11 22:19 ` Adrian Bunk
2006-07-11 20:26 ` [PATCH] Fix broken kernel headers preventing ARM build Russell King
2006-07-13 19:05 ` RFC: cleaning up the in-kernel headers Christoph Lameter
2006-07-15 4:18 ` Steven Rostedt
2006-07-15 4:59 ` Christoph Lameter
2006-07-17 0:53 ` Steven Rostedt
2006-07-20 10:56 ` Adrian Bunk
2006-07-14 0:11 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060711222400.GE13938@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.