lkml.org 
[lkml]   [2000]   [Nov]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH 2.4.0.11.3: sysctl.h fixes
Neil Brown wrote:
> The declaration of:
>
> struct file;
>
> in sysctl.h is a bit counter intuitive isn't it?

Nope. It's a useful technique that I was reminded of recently by DaveM.

Have you ever looked at the -nasty- include nesting that occurs because
key kernel headers include other key kernel headers all the time? Its
way past time to reverse that trend. Using "struct foo;" at the
beginning of the header simply passes on the task of including the
definiton for 'struct foo' down the line, avoiding another level of
include nesting.


But... that said. Provided no other kernel code is similarly broken,
your fix to md.c, Neil, is definitely superior to adding includes and
'struct file;' to sysctl.h.

Jeff


--
Jeff Garzik |
Building 1024 | Would you like a Twinkie?
MandrakeSoft |
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.027 / U:0.236 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site