[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <c7278d21-d96c-4c1e-b3bf-f82b8decc5df@stanley.mountain>
Date: Fri, 10 Jan 2025 10:12:17 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Andy Whitcroft <apw@...onical.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Joe Perches <joe@...ches.com>, Dwaipayan Ray <dwaipayanray1@...il.com>,
Lukas Bulwahn <lukas.bulwahn@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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.
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
scripts/checkpatch.pl | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index fdf07c897471..628aa9e17e91 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5513,9 +5513,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;
--
2.45.2
Powered by blists - more mailing lists