Em Sun, Oct 28, 2007 at 09:44:41AM +0100, Sam Ravnborg escreveu:
> >
> > As a general rule, I think it better to use includes
> > than use naked forward declarations.
>
> Quite the opposite - at least in the kernel source.
> The general rule is that a .h file shall include the
> .h files which co
Hi,
On Sunday 28 October 2007, Russell King wrote:
> On Sat, Oct 27, 2007 at 03:40:04PM -0700, Joe Perches wrote:
> > and forward declarations of
> >
> > struct proc_dir_entry;
> > struct file_operations;
> >
> > As a general rule, I think it better to use includes
> > than use naked forward decl
* Russell King <[EMAIL PROTECTED]> [2007-10-28 14:04]:
> On Sun, Oct 28, 2007 at 12:59:52PM +0100, Bernhard Walle wrote:
> > * Russell King <[EMAIL PROTECTED]> [2007-10-28 11:34]:
> > >
> > > If you go down that route, you end up with _lots_ of circular
> > > dependencies - header file X needs Y n
On Sun, Oct 28, 2007 at 12:59:52PM +0100, Bernhard Walle wrote:
> * Russell King <[EMAIL PROTECTED]> [2007-10-28 11:34]:
> >
> > If you go down that route, you end up with _lots_ of circular
> > dependencies - header file X needs Y needs Z which needs X. We've
> > been there, several times. It v
* Russell King <[EMAIL PROTECTED]> [2007-10-28 11:34]:
>
> If you go down that route, you end up with _lots_ of circular
> dependencies - header file X needs Y needs Z which needs X. We've
> been there, several times. It very quickly becomes quite
> unmaintainable - you end up with hard to predi
On Oct 28 2007 10:34, Russell King wrote:
>On Sat, Oct 27, 2007 at 03:40:04PM -0700, Joe Perches wrote:
>> and forward declarations of
>>
>> struct proc_dir_entry;
>> struct file_operations;
>>
>> As a general rule, I think it better to use includes
>> than use naked forward declarations.
>
>If
On Sat, Oct 27, 2007 at 03:40:04PM -0700, Joe Perches wrote:
> and forward declarations of
>
> struct proc_dir_entry;
> struct file_operations;
>
> As a general rule, I think it better to use includes
> than use naked forward declarations.
If you go down that route, you end up with _lots_ of cir
>
> As a general rule, I think it better to use includes
> than use naked forward declarations.
Quite the opposite - at least in the kernel source.
The general rule is that a .h file shall include the
.h files which contain declarations used by said .h files.
But naked declarations as above is pr
On Sat, Oct 27, 2007 at 03:40:04PM -0700, Joe Perches wrote:
> On Sat, 2007-10-27 at 23:47 +0400, Alexey Dobriyan wrote:
> > Remove proc_fs.h from headers that doesn't really need it.
>
> > --- a/arch/powerpc/kernel/process.c
> > +++ b/arch/powerpc/kernel/process.c
> > @@ -17,6 +17,7 @@
> > #incl
On Sat, 2007-10-27 at 23:47 +0400, Alexey Dobriyan wrote:
> Remove proc_fs.h from headers that doesn't really need it.
> --- a/arch/powerpc/kernel/process.c
> +++ b/arch/powerpc/kernel/process.c
> @@ -17,6 +17,7 @@
> #include
> #include
> #include
> +#include
Your code doesn't match your p
Remove proc_fs.h from headers that doesn't really need it. Typical overkill is
including full header when one can get away with just forward declaration of
"struct proc_dir_entry".
Number of files that are recompiled after touching proc_fs.h drops from 1100
to 513(!) on x86_64 allmodconfig.
Signe
11 matches
Mail list logo