mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch: don't warn about extra parentheses in staging/
Date: Fri, 10 Jan 2025 08:18:37 +0100	[thread overview]
Message-ID: <2025011025-washcloth-track-5dc6@gregkh> (raw)
In-Reply-To: <c7278d21-d96c-4c1e-b3bf-f82b8decc5df@stanley.mountain>

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>

  reply	other threads:[~2025-01-10  7:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-10  7:12 Dan Carpenter
2025-01-10  7:18 ` Greg Kroah-Hartman [this message]
2025-01-10  7:32   ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025011025-washcloth-track-5dc6@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=apw@canonical.com \
    --cc=dan.carpenter@linaro.org \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®