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/c7278d21-d96c-4c1e-b3bf-f82b8decc5df@stanley.mountain Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Andy Whitcroft <apw@canonical.com> Cc: Dwaipayan Ray <dwaipayanray1@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 65ef17a commit d22feb5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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)