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

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*\(
 )};
 
 our %allow_repeated_words = (



  reply	other threads:[~2022-05-25 15:04 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 [this message]
2022-05-25 15:34   ` Matthew Wilcox
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=7a4641e036e4821b76eb4ed5b82a4f24b3029f05.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@infradead.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).