aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorValentin Rothberg <Valentin.Rothberg@lip6.fr>2015-02-25 09:15:23 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-09 15:45:44 -0400
commit208d51154c8d7f2c3808b4401132233c5ab21572 (patch)
treec27d61b44afb9eb485594eaa2352ba38a1cba2a0 /scripts
parente94f16a4fde646b3f155788fe37339b61264b0a9 (diff)
checkkconfigsymbols.py: filter reports for tools/
Recent changes to the build system of tools suggest to filter reports for the entire tools directory. Various C preprocessor identifiers are prefixed with CONFIG_ but are NOT defined in Kconfig but in Makefiles in the tools directory. Such identifiers are false positives for most static analysis tools (i.e., scripts/checkkconfigsymbols.py) since the CONFIG_ prefix and the _MODULE suffix is reserved for Kconfig features in CPP and Make syntax. Signed-off-by: Valentin Rothberg <Valentin.Rothberg@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x[-rw-r--r--]scripts/checkkconfigsymbols.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/checkkconfigsymbols.py b/scripts/checkkconfigsymbols.py
index e9cc689033fe..6445693df669 100644..100755
--- a/scripts/checkkconfigsymbols.py
+++ b/scripts/checkkconfigsymbols.py
@@ -2,7 +2,7 @@
2 2
3"""Find Kconfig identifiers that are referenced but not defined.""" 3"""Find Kconfig identifiers that are referenced but not defined."""
4 4
5# (c) 2014 Valentin Rothberg <valentinrothberg@gmail.com> 5# (c) 2014-2015 Valentin Rothberg <Valentin.Rothberg@lip6.fr>
6# (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de> 6# (c) 2014 Stefan Hengelein <stefan.hengelein@fau.de>
7# 7#
8# Licensed under the terms of the GNU GPL License version 2 8# Licensed under the terms of the GNU GPL License version 2
@@ -46,8 +46,9 @@ def main():
46 stdout = stdout[:-1] 46 stdout = stdout[:-1]
47 47
48 for gitfile in stdout.rsplit("\n"): 48 for gitfile in stdout.rsplit("\n"):
49 if ".git" in gitfile or "ChangeLog" in gitfile or \ 49 if ".git" in gitfile or "ChangeLog" in gitfile or \
50 ".log" in gitfile or os.path.isdir(gitfile): 50 ".log" in gitfile or os.path.isdir(gitfile) or \
51 gitfile.startswith("tools/"):
51 continue 52 continue
52 if REGEX_FILE_KCONFIG.match(gitfile): 53 if REGEX_FILE_KCONFIG.match(gitfile):
53 kconfig_files.append(gitfile) 54 kconfig_files.append(gitfile)