checkpatch: allow consecutive close braces

checkpatch allows consecutive open braces, so it should also allow
consecutive close braces.

Link: http://lkml.kernel.org/r/bfdb49ae2c3fa7b52fa168769e38b48f959880e2.camel@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Joe Perches 2019-09-25 16:46:47 -07:00 committed by Linus Torvalds
parent 462811d9d4
commit 94fb984504
1 changed files with 1 additions and 1 deletions

View File

@ -4673,7 +4673,7 @@ sub process {
# closing brace should have a space following it when it has anything # closing brace should have a space following it when it has anything
# on the line # on the line
if ($line =~ /}(?!(?:,|;|\)))\S/) { if ($line =~ /}(?!(?:,|;|\)|\}))\S/) {
if (ERROR("SPACING", if (ERROR("SPACING",
"space required after that close brace '}'\n" . $herecurr) && "space required after that close brace '}'\n" . $herecurr) &&
$fix) { $fix) {