Skip to content

Commit d22feb5

Browse files
Dan Carpenterakpm00
authored andcommitted
checkpatch: don't warn about extra parentheses in staging/
This "Unnecessary parentheses" warning is disabled for drivers/staging unless the --strict option is used. Really, we don't want it at all even if the --strict option is used. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Cc: Andy Whitcroft <[email protected]> Cc: Dwaipayan Ray <[email protected]> Cc: Joe Perches <[email protected]> Cc: Lukas Bulwahn <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 65ef17a commit d22feb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/checkpatch.pl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5503,9 +5503,9 @@ sub process {
55035503
}
55045504
}
55055505

5506-
# check for unnecessary parentheses around comparisons in if uses
5507-
# when !drivers/staging or command-line uses --strict
5508-
if (($realfile !~ m@^(?:drivers/staging/)@ || $check_orig) &&
5506+
# check for unnecessary parentheses around comparisons
5507+
# except in drivers/staging
5508+
if (($realfile !~ m@^(?:drivers/staging/)@) &&
55095509
$perl_version_ok && defined($stat) &&
55105510
$stat =~ /(^.\s*if\s*($balanced_parens))/) {
55115511
my $if_stat = $1;

0 commit comments

Comments
 (0)