[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171023130605.65076-1-carenas@gmail.com>
Date: Mon, 23 Oct 2017 06:06:05 -0700
From: Carlo Marcelo Arenas Belón
<carenas@...il.com>
To: linux-kernel@...r.kernel.org
Cc: apw@...onical.com, joe@...ches.com,
Carlo Marcelo Arenas Belón
<carenas@...il.com>
Subject: [PATCH] checkpatch: avoid false positive closing bracket with initializers
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@...il.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
Powered by blists - more mailing lists