linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Joe Perches <joe@perches.com>
Cc: David Howells <dhowells@redhat.com>,
	Andy Whitcroft <apw@canonical.com>,
	linux-kernel@vger.kernel.org
Subject: Re: checkpatch mistake on XA_STATE?
Date: Wed, 25 May 2022 16:34:16 +0100	[thread overview]
Message-ID: <Yo5MeLcwMg5VZmmJ@casper.infradead.org> (raw)
In-Reply-To: <7a4641e036e4821b76eb4ed5b82a4f24b3029f05.camel@perches.com>

On Wed, May 25, 2022 at 08:03:16AM -0700, Joe Perches wrote:
> On Wed, 2022-05-25 at 11:13 +0100, David Howells wrote:
> > I see the following:
> > 
> > 	WARNING: Missing a blank line after declarations
> > 	#1921: FILE: fs/cifs/smb2ops.c:4684:
> > 	+       struct folio *folio;
> > 	+       XA_STATE(xas, buffer, 0);
> > 
> > but XA_STATE() technically *is* a declaration.
> > 
> > Should checkpatch treat it as such?
> 
> Probably.
> ---
>  scripts/checkpatch.pl | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 503e8abbb2c1e..2cf28014132f6 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1042,7 +1042,8 @@ our $FuncArg = qr{$Typecast{0,1}($LvalOrFunc|$Constant|$String)};
>  our $declaration_macros = qr{(?x:
>  	(?:$Storage\s+)?(?:[A-Z_][A-Z0-9]*_){0,2}(?:DEFINE|DECLARE)(?:_[A-Z0-9]+){1,6}\s*\(|
>  	(?:$Storage\s+)?[HLP]?LIST_HEAD\s*\(|
> -	(?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(
> +	(?:SKCIPHER_REQUEST|SHASH_DESC|AHASH_REQUEST)_ON_STACK\s*\(|
> +	(?:$Storage\s+)?(?:XA_ARRAY|XA_ARRAY_ORDER)\s*\(

XA_STATE, not XA_ARRAY.


  reply	other threads:[~2022-05-25 15:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 10:13 checkpatch mistake on XA_STATE? David Howells
2022-05-25 15:03 ` Joe Perches
2022-05-25 15:34   ` Matthew Wilcox [this message]
2022-05-25 19:03 ` [PATCH] checkpatch: Add XA_STATE and XA_STATE_ORDER to the macro declaration list 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=Yo5MeLcwMg5VZmmJ@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=apw@canonical.com \
    --cc=dhowells@redhat.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).