From: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: apw@canonical.com, joe@perches.com,
"Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Subject: [PATCH] checkpatch: avoid false positive closing bracket with initializers
Date: Mon, 23 Oct 2017 06:06:05 -0700 [thread overview]
Message-ID: <20171023130605.65076-1-carenas@gmail.com> (raw)
when multiple closing brackets are being used for an universal zero
intializer as in (for example):
struct timespec tv[10] = {{0}};
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
scripts/checkpatch.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 8b80bac055e4..fe271697a2a8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -4423,7 +4423,7 @@ sub process {
# closing brace should have a space following it when it has anything
# on the line
- if ($line =~ /}(?!(?:,|;|\)))\S/) {
+ if ($line =~ /}(?!(?:,|;|}|\)))\S/) {
if (ERROR("SPACING",
"space required after that close brace '}'\n" . $herecurr) &&
$fix) {
--
2.14.2
next reply other threads:[~2017-10-23 13:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-23 13:06 Carlo Marcelo Arenas Belón [this message]
2017-10-23 22:18 ` [PATCH] checkpatch: avoid false positive closing bracket with initializers 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=20171023130605.65076-1-carenas@gmail.com \
--to=carenas@gmail.com \
--cc=apw@canonical.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