mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
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>
This commit is contained in:
parent
65ef17aa07
commit
d22feb5b64
1 changed files with 3 additions and 3 deletions
|
|
@ -5503,9 +5503,9 @@ sub process {
|
|||
}
|
||||
}
|
||||
|
||||
# check for unnecessary parentheses around comparisons in if uses
|
||||
# when !drivers/staging or command-line uses --strict
|
||||
if (($realfile !~ m@^(?:drivers/staging/)@ || $check_orig) &&
|
||||
# check for unnecessary parentheses around comparisons
|
||||
# except in drivers/staging
|
||||
if (($realfile !~ m@^(?:drivers/staging/)@) &&
|
||||
$perl_version_ok && defined($stat) &&
|
||||
$stat =~ /(^.\s*if\s*($balanced_parens))/) {
|
||||
my $if_stat = $1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue