mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Vegard Nossum" <vegard.nossum@gmail.com>
To: "Julia Lawall" <julia@diku.dk>
Cc: "Adrian Bunk" <bunk@kernel.org>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Pekka Enberg" <penberg@cs.helsinki.fi>,
	linux-kbuild@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] headerdep: a tool for detecting inclusion cycles in header file
Date: Sat, 26 Apr 2008 17:30:46 +0200	[thread overview]
Message-ID: <19f34abd0804260830w1b8654c2yaa9e7432b36b3597@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0804261720060.2756@ask.diku.dk>

On 4/26/08, Julia Lawall <julia@diku.dk> wrote:
> On Sat, 26 Apr 2008, Adrian Bunk wrote:
>
>  > On Sat, Apr 26, 2008 at 03:45:54PM +0200, Vegard Nossum wrote:
>  > > Hi Sam,
>  > >
>  > > Maybe something like this could be useful for cleaning up headers (and
>  > > maintaining that cleanliness once it has been achieved). What do you think?
>  > >
>  > > (One thing which might or might not be good is that 'make headerdep' will
>  > >  also compile using CC if they're not already compiled. If this should be
>  > >  fixed, I think you'd know how to do it.)
>  >
>  > This way you only catch problems in the current kernel configuration.
>  >
>  > The only problems are under include/, and you should be able to do this
>  > by parsing all headers and without hooking into the build system.
>
>
> I guess one would still have to consider all of the possible permutations
>  of values of configuration variables, to interpret the #ifdefs that have
>  an impact on what is included?  A quick grep suggests that they are mostly
>  related to  __KERNEL__, so perhaps it would not be too expensive to do.

We don't interpret #defines or #ifdefs or #ifs at all. If we did this,
then the program would detect no cycles (because of the header
guards).

The rationale is that any cycle at all, regardless of any guards that
might exist, is wrong. In my opinion anwyay :-)

Vegard

-- 
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
	-- E. W. Dijkstra, EWD1036

  reply	other threads:[~2008-04-26 15:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-26 13:45 Vegard Nossum
2008-04-26 13:59 ` Pekka Enberg
2008-04-26 14:17   ` Vegard Nossum
2008-04-26 14:22     ` Nick Andrew
2008-04-26 18:03       ` Jan Engelhardt
2008-04-26 15:00 ` Adrian Bunk
2008-04-26 15:21   ` Julia Lawall
2008-04-26 15:30     ` Vegard Nossum [this message]
2008-04-26 15:25   ` Vegard Nossum
2008-04-26 16:17 ` Matthew Wilcox
2008-04-26 16:38   ` Adrian Bunk
2008-04-30 17:57   ` "Anyone who likes complexity and fuzzy logic" (Re: [PATCH] headerdep:...) Oleg Verych
2008-04-30 17:38     ` Matthew Wilcox
2008-04-26 16:44 ` [PATCH] headerdep: a tool for detecting inclusion cycles in header file Adrian Bunk
2008-04-26 16:57   ` Vegard Nossum
2008-04-26 17:23     ` Adrian Bunk
2008-04-26 17:55       ` Vegard Nossum
2008-04-26 18:11 ` Jan Engelhardt
2008-04-26 18:26 ` Sam Ravnborg

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=19f34abd0804260830w1b8654c2yaa9e7432b36b3597@mail.gmail.com \
    --to=vegard.nossum@gmail.com \
    --cc=bunk@kernel.org \
    --cc=julia@diku.dk \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=sam@ravnborg.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

all inboxes | Powered by JetHome®