mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] checkpatch: don't warn about extra parentheses in staging/
@ 2025-01-10  7:12 Dan Carpenter
  2025-01-10  7:18 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2025-01-10  7:12 UTC (permalink / raw)
  To: Andy Whitcroft, Greg Kroah-Hartman
  Cc: Joe Perches, Dwaipayan Ray, Lukas Bulwahn, linux-kernel

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@linaro.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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-01-10  7:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-10  7:12 [PATCH] checkpatch: don't warn about extra parentheses in staging/ Dan Carpenter
2025-01-10  7:18 ` Greg Kroah-Hartman
2025-01-10  7:32   ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®