Re: [PATCH] x86 setup.c: cleanup includes

From: Alexander Beregalov
Date: Sun Jul 06 2008 - 16:29:54 EST


2008/7/6 Randy Dunlap <randy.dunlap@xxxxxxxxxx>:
> Did you do these manually (by personal inspection) or by some tool?
> If a tool, what tool/where is it? Thanks.

It is a simple script like this:

find . -name "*.h" -exec grep.sh {} \;
find . -name "*.c" -exec grep.sh {} \;

grep.sh:
#!/bin/sh
grep -H "^#include" $1|sed "s,/\*.\+,,"|grep -v ":$"|sort|uniq -c|grep
-v "^ \+1:"

I have found about 70-80 double inclusions, but most of them have
reason for that and can not be removed.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/