summaryrefslogtreecommitdiff
path: root/util/lint/kconfig_lint
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2021-04-02 21:56:45 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-04-18 20:35:37 +0000
commit2d82195f976f2716b44c36042d78a55c42f1ad34 (patch)
tree7f3e4099a4978d4fac6600715ad44efa8565fbd0 /util/lint/kconfig_lint
parentf6b2baa3e883c174e3e0fa79bc9e739d2b0971dd (diff)
util/kconfig_lint: Update handle_expressions()
More relational operators were added to Kconfig in 2015. Now we can make use of them. Change-Id: I640e5c3ee1485348f09fcb0b0d5035eb53a2c98e Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52068 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'util/lint/kconfig_lint')
-rwxr-xr-xutil/lint/kconfig_lint10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 7f042f6aff..04c582a34e 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -985,22 +985,22 @@ sub handle_expressions {
my $balanced = qr/((?:$parens|$quotes|[^\(\)"])+)/;
if ( $exprline =~ /^\s*$balanced\s*(?:\|\||&&)\s*(.+)$/ ) {
- # <expr> '||' <expr>, <expr> '&&' <expr> (7)(6)
+ # <expr> '||' <expr>, <expr> '&&' <expr> (8)(7)
my ( $lhs, $rhs ) = ( $1, $3 );
handle_expressions( $lhs, $inside_config, $filename, $line_no );
handle_expressions( $rhs, $inside_config, $filename, $line_no );
}
elsif ( $exprline =~ /^\s*!(.+)$/ ) {
- # '!' <expr> (5)
+ # '!' <expr> (6)
handle_expressions( $1, $inside_config, $filename, $line_no );
}
elsif ( $exprline =~ /^\s*$parens\s*$/ ) {
- # '(' <expr> ')' (4)
+ # '(' <expr> ')' (5)
$exprline =~ /^\s*\((.*)\)\s*$/;
handle_expressions( $1, $inside_config, $filename, $line_no );
}
- elsif ( $exprline =~ /^\s*($quotes|[^"\s]+)\s*!=$strip$/ ) {
- # <symbol> '!=' <symbol> (3)
+ elsif ( $exprline =~ /^\s*($quotes|[^"\s]+)\s*(?:[<>]=?|!=)$strip$/ ) {
+ # <symbol> '<' <symbol>, <symbol> '!=' <symbol>, etc. (4)(3)
my ( $lhs, $rhs ) = ( $1, $2 );
handle_symbol( $lhs, $filename, $line_no );
handle_symbol( $rhs, $filename, $line_no );