checkkconfigsymbols.sh: Kconfig symbols sometimes have lowercase letters
authorRoland Dreier <rdreier@cisco.com>
Wed, 2 Jun 2010 20:56:36 +0000 (13:56 -0700)
committerMichal Marek <mmarek@suse.cz>
Thu, 3 Jun 2010 08:39:39 +0000 (10:39 +0200)
Quite a few Kconfig symbols contain lowercase letters.  The current
checkkconfigsymbols.sh code only contains A-Z in the regexp it uses to
find config symbols in source code, so it comes up with the wrong symbol
to look for in Kconfig files and then generates false positives when it
doesn't find that wrong symbol.  For example checking drivers/net
generates a false positive for MAC89 because the the actual config
option is MAC89x0.

Fix this by also adding a-z to the regexp.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/checkkconfigsymbols.sh

index 46be3c5a62b79d533668aeefd50905a6f5dbf383..2ca49bb31efc0b19995944260466d4601b403016 100755 (executable)
@@ -14,7 +14,7 @@ find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while
 do
        # Output the bare Kconfig variable and the filename; the _MODULE part at
        # the end is not removed here (would need perl an not-hungry regexp for that).
-       sed -ne 's!^.*\<\(UML_\)\?CONFIG_\([0-9A-Z_]\+\).*!\2 '$i'!p' < $i
+       sed -ne 's!^.*\<\(UML_\)\?CONFIG_\([0-9A-Za-z_]\+\).*!\2 '$i'!p' < $i
 done | \
 # Smart "sort|uniq" implemented in awk and tuned to collect the names of all
 # files which use a given symbol