Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Dan Carpenter and committed by
Andrew Morton
d22feb5b 65ef17aa

+3 -3
+3 -3
scripts/checkpatch.pl
··· 5503 5503 } 5504 5504 } 5505 5505 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/)@) && 5509 5509 $perl_version_ok && defined($stat) && 5510 5510 $stat =~ /(^.\s*if\s*($balanced_parens))/) { 5511 5511 my $if_stat = $1;