[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B83DF4A.9020502@s5r6.in-berlin.de>
Date: Tue, 23 Feb 2010 14:59:38 +0100
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: Borislav Petkov <bp@...64.org>
CC: viresh kumar <viresh.linux@...il.com>,
Borislav Petkov <petkovbb@...glemail.com>,
linux-kernel@...r.kernel.org
Subject: Re: QUERY: Inclusion of header files in kernel header files
Borislav Petkov wrote:
> From: viresh kumar <viresh.linux@...il.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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists