checkkconfigsymbols.py: support Kconfig's 'imply' statement
authorValentin Rothberg <valentinrothberg@gmail.com>
Thu, 2 Feb 2017 17:00:44 +0000 (18:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2017 10:49:06 +0000 (11:49 +0100)
Support the new imply statement in Kconfig.  The imply statement has
been added by commit 237e3ad0f195 ("Kconfig: Introduce the "imply"
keyword") and is a weak version of a select, but the target symbol can
still be turned off.

Signed-off-by: Andreas Ziegler <andreas.ziegler@fau.de>
Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
scripts/checkkconfigsymbols.py

index f1d6b14081ac68766bc60ea1c675952722c6962c..8cd16c65d3c55ef5b504504f976597c2f6d040c6 100755 (executable)
@@ -24,7 +24,7 @@ SYMBOL = r"(?:\w*[A-Z0-9]\w*){2,}"
 DEF = r"^\s*(?:menu){,1}config\s+(" + SYMBOL + r")\s*"
 EXPR = r"(?:" + OPERATORS + r"|\s|" + SYMBOL + r")+"
 DEFAULT = r"default\s+.*?(?:if\s.+){,1}"
-STMT = r"^\s*(?:if|select|depends\s+on|(?:" + DEFAULT + r"))\s+" + EXPR
+STMT = r"^\s*(?:if|select|imply|depends\s+on|(?:" + DEFAULT + r"))\s+" + EXPR
 SOURCE_SYMBOL = r"(?:\W|\b)+[D]{,1}CONFIG_(" + SYMBOL + r")"
 
 # regex objects