linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Linus Torvalds <torvalds@osdl.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Bernardo Innocenti <bernie@develer.com>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Russell King <rmk@arm.linux.org.uk>
Subject: Re: Linux 2.6.0-test6
Date: Sun, 28 Sep 2003 22:00:01 +0200	[thread overview]
Message-ID: <20030928200001.GC16921@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <20030928204224.G1428@flint.arm.linux.org.uk>

On Sun, 28 September 2003 20:42:24 +0100, Russell King wrote:
> 
> I have a bad feeling about this, so I'll make the following comments
> up front before all the reports start rolling in.  It may be a good
> idea to document this somewhere.  (Coding style?)
> 
> If a header has something like these:
> 
> struct my_headers_struct {
> 	struct task_struct *tsk;
> };
> 
> void my_function(struct task_struct *tsk);
> 
> and gcc warns that "struct task_struct" has not been declared, please
> don't think about adding another header.  Just declare the structure
> in the header file which needs it like this:
> 
> struct task_struct;
> 
> and that will prevent the #include maze of 2.4, which resulted in
> everything being rebuilt just because one header file was touched.

Ok, how about this:

for each header file {
	make header.o
1)	if it doesn't build {
		print out a warning
		continue
	}
	for each #include line {
		remove the #include line
		make header.o
2)		if it build {
			print out a warning
		}
3)		if there are less than x gcc warnings {
			print out a warning
		}
	}
}

1) is my old proposal.  2) is the natural counterpart.  3) could be
what you want.  If some header is only needed for something like your
example, we may be able to catch it this way.

Would this work?  Would something else work even better?

Jörn

-- 
Rules of Optimization:
Rule 1: Don't do it.
Rule 2 (for experts only): Don't do it yet.
-- M.A. Jackson 

  reply	other threads:[~2003-09-28 20:00 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-28 10:14 Linux 2.6.0-test6 Geert Uytterhoeven
2003-09-28 12:50 ` Russell King
2003-09-28 13:54   ` Bernardo Innocenti
2003-09-28 17:37 ` Linus Torvalds
2003-09-28 18:46   ` Sam Ravnborg
2003-09-28 18:52     ` Linus Torvalds
2003-09-28 19:44       ` Jamie Lokier
2003-09-28 19:16     ` Jörn Engel
2003-09-28 19:31       ` Sam Ravnborg
2003-09-28 19:44         ` Jörn Engel
2003-09-29 13:36           ` [PATCH] check headers for complete includes, etc Jörn Engel
2003-09-29 13:40             ` Jörn Engel
2003-09-29 14:50             ` Sam Ravnborg
2003-09-29 15:00               ` Jörn Engel
2003-09-29 17:10                 ` Dominik Kubla
2003-10-01  9:48               ` [PATCH v2] " Jörn Engel
2003-10-01 16:39                 ` Sam Ravnborg
2003-10-01 17:00                   ` Jörn Engel
2003-10-01 18:01                   ` [PATCH v3] " Jörn Engel
2003-10-01 21:09                     ` Sam Ravnborg
2003-10-02  8:37                       ` [PATCH v4] " Jörn Engel
2003-09-28 19:42       ` Linux 2.6.0-test6 Russell King
2003-09-28 20:00         ` Jörn Engel [this message]
2003-09-28 21:43           ` Tim Schmielau
2003-09-28 21:54             ` Arnaldo Carvalho de Melo
2003-10-02 16:16           ` [PATCH] remove unnecessary #includes from <linux/fs.h> Jörn Engel
2003-10-02 17:22             ` Sam Ravnborg
2003-10-02 17:26               ` Jörn Engel
2003-10-03 15:03             ` Tim Schmielau
2003-09-29 15:08         ` Linux 2.6.0-test6 Chris Friesen
2003-09-29 15:14           ` Geert Uytterhoeven
2003-09-28 19:28   ` Russell King
2003-09-29  8:52     ` Geert Uytterhoeven
2003-09-29 19:19   ` bill davidsen
2003-09-30 10:42     ` Jörn Engel
2003-09-30 15:17       ` Bill Davidsen
2003-10-01  9:08         ` Jörn Engel
     [not found] <&lt;3F7CBDD4.7010503@cyberone.com.au&gt;>
2003-10-03  3:51 ` Jason Munro
2003-10-06  3:05   ` bill davidsen
2003-10-09 18:44   ` bill davidsen
  -- strict thread matches above, loose matches on Subject: below --
2003-09-29  9:00 Oliver Pitzeier
2003-09-28 12:19 Oliver Pitzeier
2003-09-28 12:52 ` Geert Uytterhoeven
2003-09-28 21:41   ` Andrew Morton
2003-09-29  9:58     ` Geert Uytterhoeven
2003-09-29 10:08       ` Russell King
2003-09-29 19:19         ` Anton Blanchard
2003-09-28 12:53 ` viro
2003-09-28 13:54 ` Urban Widmark
2003-09-28  1:27 Linus Torvalds
2003-09-28  7:03 ` Con Kolivas
2003-09-28 10:02   ` Rob Landley
2003-09-29  4:55     ` Nick Piggin
2003-09-29  7:35       ` Rob Landley
2003-09-29 16:55       ` Ed Sweetman
2003-09-30  0:03         ` Nick Piggin
2003-10-02  0:41         ` Pedro Larroy
2003-10-02  3:05           ` Nick Piggin
2003-10-02 19:07             ` Pedro Larroy
2003-10-03  0:07               ` Nick Piggin
2003-10-03 19:34                 ` Pedro Larroy
2003-09-29 18:45       ` bill davidsen
2003-09-30  1:12         ` Nick Piggin
2003-10-01 21:13           ` bill davidsen
2003-10-02  2:45             ` Nick Piggin
2003-09-28  8:26 ` Markus Hästbacka
2003-09-28 10:54   ` Jeff Garzik
2003-09-28 10:09 ` Rafał 'rmrmg' Roszak
2003-09-28 11:05 ` Andreas Jellinghaus
2003-09-28 12:34   ` Dave Jones
2003-09-28 16:12     ` Andreas Jellinghaus
2003-09-28 17:51       ` Andries Brouwer
2003-09-28 16:42 ` Ivan Gyurdiev
2003-09-29 13:23 ` Florin Iucha
2003-09-29 13:55   ` Muli Ben-Yehuda
2003-09-29 14:01     ` Jaroslav Kysela
2003-09-29 14:18       ` Muli Ben-Yehuda
2003-09-29 19:04         ` bill davidsen
2003-09-29 14:30       ` Takashi Iwai
2003-09-29 13:58   ` Jaroslav Kysela

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=20030928200001.GC16921@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=bernie@develer.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    --cc=sam@ravnborg.org \
    --cc=torvalds@osdl.org \
    /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;
as well as URLs for NNTP newsgroup(s).