From: Sam Ravnborg <sam@ravnborg.org>
To: Vegard Nossum <vegard.nossum@gmail.com>
Cc: Adrian Bunk <bunk@kernel.org>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Nick Andrew <nick@nick-andrew.net>,
Matthew Wilcox <matthew@wil.cx>,
Jan Engelhardt <jengelh@computergmbh.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] headerdep: a tool for detecting inclusion cycles in header files
Date: Sat, 13 Dec 2008 23:22:59 +0100 [thread overview]
Message-ID: <20081213222259.GB29080@uranus.ravnborg.org> (raw)
In-Reply-To: <20080503202718.GA9996@damson>
On Sat, May 03, 2008 at 10:27:18PM +0200, Vegard Nossum wrote:
> Hi,
>
> Here comes v2 of this tool. I've addressed most of your nitpicks and specific
> comments. Running 'make headerdep', will go through all headers (instead of
> source files as v1 did). Running with the --graph option will produce a
> dependency graph in the 'dot' language (GraphViz).
>
> Note that I am not really making an attempt to include this in the kernel
> itself; I am submitting it in the hope that somebody will find it useful.
>
> For Sam: Writing this in sparse is a waste of time. Sparse is good for parsing
> C code; this script only cares about a subset of the C _preprocessor_ parsing.
> Perl is good at this, and the script was finished in a couple of hours. Sparse
> is C and would require a bit more work, I'm sure.
>
> The most useful tool, as suggested by several people (Matthew Wilcox,
> Sam Ravnborg), would be the one that detects unused headers and missing
> (implicit) includes. That is indeed a job for sparse. But not a job for me,
> or at least not yet :-)
>
> So again, I have no expectations for this to go in the kernel -- but in my
> opinion a tool that could be used on the kernel headers with some advantage.
Hi Vegard.
Digging through my mailbox I found this patch of yours.
I tried to apply it and saw following output:
In file included from linux/mmzone.h,
from linux/topology.h
from linux/mmzone.h
from linux/gfp.h
from linux/slub_def.h
from linux/slab.h
from linux/percpu.h
from asm-generic/irq_regs.h
include/asm-xtensa/irq_regs.h: warning: recursive header inclusion
But looking at the file (include/asm-xtensa/irq_regs.h) did
not help me understand where to look to fix it.
Can you pinpoint the culprint better so this is becoming useful?
I would also like to see this integrated with checkincludes.pl
as both script do some simple static checks of the header files.
Additional bonus if we can reuse this to do better check of
our exported headers.
Sam
next prev parent reply other threads:[~2008-12-13 22:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-03 20:27 Vegard Nossum
2008-12-13 22:22 ` Sam Ravnborg [this message]
2008-12-16 11:52 ` Vegard Nossum
2008-12-18 19:24 ` 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=20081213222259.GB29080@uranus.ravnborg.org \
--to=sam@ravnborg.org \
--cc=bunk@kernel.org \
--cc=jengelh@computergmbh.de \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=nick@nick-andrew.net \
--cc=penberg@cs.helsinki.fi \
--cc=vegard.nossum@gmail.com \
/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®