Re: [PATCH] proc_fs.h redux

2007-10-29 Thread Arnaldo Carvalho de Melo
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

Re: [PATCH] proc_fs.h redux

2007-10-28 Thread Roman Zippel
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

Re: [PATCH] proc_fs.h redux

2007-10-28 Thread Bernhard Walle
* 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

Re: [PATCH] proc_fs.h redux

2007-10-28 Thread Russell King
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

Re: [PATCH] proc_fs.h redux

2007-10-28 Thread Bernhard Walle
* 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

Re: [PATCH] proc_fs.h redux

2007-10-28 Thread Jan Engelhardt
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

Re: [PATCH] proc_fs.h redux

2007-10-28 Thread Russell King
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

Re: [PATCH] proc_fs.h redux

2007-10-28 Thread Sam Ravnborg
> > 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

Re: [PATCH] proc_fs.h redux

2007-10-28 Thread Alexey Dobriyan
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

Re: [PATCH] proc_fs.h redux

2007-10-27 Thread Joe Perches
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

[PATCH] proc_fs.h redux

2007-10-27 Thread Alexey Dobriyan
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