From: Andy Whitcroft <apw@canonical.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Joe Perches <joe@perches.com>,
linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>
Subject: [PATCH 5/5] checkpatch: add [] to type extensions
Date: Thu, 1 Mar 2012 12:44:10 +0000 [thread overview]
Message-ID: <1330605850-7873-6-git-send-email-apw@canonical.com> (raw)
In-Reply-To: <1330605850-7873-1-git-send-email-apw@canonical.com>
Add [] to a type extensions. Fixes false positives on:
.attrs = (struct attribute *[]) {
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
scripts/checkpatch.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 610036e..2bfe013 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -323,7 +323,7 @@ sub build_types {
}x;
$Type = qr{
$NonptrType
- (?:[\s\*]+\s*const|[\s\*]+|(?:\s*\[\s*\])+)?
+ (?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)?
(?:\s+$Inline|\s+$Modifier)*
}x;
$Declare = qr{(?:$Storage\s+)?$Type};
--
1.7.9
prev parent reply other threads:[~2012-03-01 12:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-01 12:44 [PATCH 0/5] checkpatch update Andy Whitcroft
2012-03-01 12:44 ` [PATCH 1/5] checkpatch: catch [ ... ] usage when not at the beginning of defination Andy Whitcroft
2012-03-01 12:44 ` [PATCH 2/5] checkpatch: allow simple character constants in #defines Andy Whitcroft
2012-03-01 12:44 ` [PATCH 3/5] checkpatch: handle string concatenation in simple #defines Andy Whitcroft
2012-03-01 12:44 ` [PATCH 4/5] checkpatch: high precidence operators do not require additional parentheses in #defines Andy Whitcroft
2012-03-01 12:44 ` Andy Whitcroft [this message]
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=1330605850-7873-6-git-send-email-apw@canonical.com \
--to=apw@canonical.com \
--cc=akpm@linux-foundation.org \
--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
all inboxes | Powered by JetHome®