lkml.org 
[lkml]   [2008]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86 setup.c: cleanup includes
2008/7/6 Randy Dunlap <randy.dunlap@oracle.com>:
> 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.


\
 
 \ /
  Last update: 2008-07-06 22:33    [W:0.043 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site