* [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
* Re: [PATCH] checkpatch: don't warn about extra parentheses in staging/
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
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2025-01-10 7:18 UTC (permalink / raw)
To: Dan Carpenter
Cc: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn, linux-kernel
On Fri, Jan 10, 2025 at 10:12:17AM +0300, Dan Carpenter wrote:
> 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
>
Yes! Thanks for this:
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] checkpatch: don't warn about extra parentheses in staging/
2025-01-10 7:18 ` Greg Kroah-Hartman
@ 2025-01-10 7:32 ` Joe Perches
0 siblings, 0 replies; 3+ messages in thread
From: Joe Perches @ 2025-01-10 7:32 UTC (permalink / raw)
To: Greg Kroah-Hartman, Dan Carpenter, Andrew Morton
Cc: Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn, linux-kernel
On Fri, 2025-01-10 at 08:18 +0100, Greg Kroah-Hartman wrote:
> On Fri, Jan 10, 2025 at 10:12:17AM +0300, Dan Carpenter wrote:
> > 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
> >
>
> Yes! Thanks for this:
>
> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
I have no issue with this.
Andrew, please apply it.
^ 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®