From: David Woodhouse <dwmw2@infradead.org>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: why so many unexported headers checking __KERNEL__?
Date: Wed, 26 Mar 2008 12:08:44 +0000 [thread overview]
Message-ID: <1206533324.9540.268.camel@pmac.infradead.org> (raw)
In-Reply-To: <alpine.LFD.1.00.0803230229530.1203@localhost.localdomain>
On Sun, 2008-03-23 at 02:31 -0400, Robert P. J. Day wrote:
>
> as an unintended side effect of checking for proper exporting to
> user space and unifdef'ing, i noticed that there are literally
> hundreds of kernel header files that check the value of __KERNEL__ in
> some way, but are never exported to user space. what's the point of
> that? thanks.
There's no point -- we just haven't got round to removing it yet.
We should probably make headers_check or some other automated check
catch these two cases:
If a header is exported by header-y or not exported at all, it shouldn't
contain any #ifdef __KERNEL__.
And if it's exported and doesn't contain any #ifdef __KERNEL__, it
should be header-y not unifdef-y (and that's the case we should be
moving towards, by cleaning up headers to have separate files for the
user-visible parts).
--
dwmw2
next prev parent reply other threads:[~2008-03-26 12:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-23 6:31 Robert P. J. Day
2008-03-26 12:08 ` David Woodhouse [this message]
2008-03-26 12:53 ` Robert P. J. Day
2008-03-26 13:10 ` David Woodhouse
2008-03-26 13:16 ` Robert P. J. Day
2008-03-26 13:19 ` David Woodhouse
2008-03-26 13:23 ` Robert P. J. Day
2008-03-26 13:37 ` Robert P. J. Day
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=1206533324.9540.268.camel@pmac.infradead.org \
--to=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rpjday@crashcourse.ca \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®