From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: Borislav Petkov <bp@amd64.org>
Cc: viresh kumar <viresh.linux@gmail.com>,
Borislav Petkov <petkovbb@googlemail.com>,
linux-kernel@vger.kernel.org
Subject: Re: QUERY: Inclusion of header files in kernel header files
Date: Tue, 23 Feb 2010 14:59:38 +0100 [thread overview]
Message-ID: <4B83DF4A.9020502@s5r6.in-berlin.de> (raw)
In-Reply-To: <20100223130128.GB30382@aftab>
Borislav Petkov wrote:
> From: viresh kumar <viresh.linux@gmail.com>
>> Actually this issue is not present only in bus.h, but some other
>> kernel header files.
>> Like: arch/arm/include/asm/clkdev.h don't include list.h file but
>> using struct list_head
>>
>> May be we need to check this in other header files also.
>
> Well, you should talk to the arm maintainer about that task and whether
> it is desirable.
I agree but feel compelled to add: While each header file should indeed
include everything that is necessary to allow for arbitrary orders of
inclusion of this header,¹ this is sometimes not possible for core
kernel headers or architecture headers.
An example over which I stumbled a few days ago: linux/wait.h cannot
easily include linux/sched.h although it uses definitions from it.
There is a direct circular dependency which can be easily resolved, but
there are also dependencies at deeper levels of indirection which cannot
be easily resolved.
----------
¹) IOW each header should include everything which it uses. OTOH a
user of that header should not rely on having its own dependencies
included indirectly.
--
Stefan Richter
-=====-==-=- --=- =-===
http://arcgraph.de/sr/
next prev parent reply other threads:[~2010-02-23 14:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <22dbbef21002222241h711402f1me6b60ac7502cccd4@mail.gmail.com>
2010-02-23 6:43 ` viresh kumar
2010-02-23 6:59 ` Borislav Petkov
2010-02-23 7:31 ` viresh kumar
2010-02-23 9:50 ` Borislav Petkov
2010-02-23 11:37 ` viresh kumar
2010-02-23 13:01 ` Borislav Petkov
2010-02-23 13:59 ` Stefan Richter [this message]
2010-02-24 4:23 ` viresh kumar
2010-02-23 15:15 ` Theodore Tso
2010-02-24 4:28 ` viresh kumar
2010-02-24 7:02 ` Theodore Tso
2010-02-24 10:38 ` Clemens Ladisch
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=4B83DF4A.9020502@s5r6.in-berlin.de \
--to=stefanr@s5r6.in-berlin.de \
--cc=bp@amd64.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@googlemail.com \
--cc=viresh.linux@gmail.com \
/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
Powered by JetHome