Martin Roth (martinroth@google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16348
-gerrit
commit 77be988f7105d8ebc1daeea2058e17f46f24323b Author: Martin Roth martinroth@google.com Date: Mon Aug 29 10:39:30 2016 -0600
lint/checkpatch.pl: Pull in coreboot fixes
This pulls in two fixes that were added to coreboot's checkpatch.pl script:
- commit 82ef8ada (src/commonlib/lz4_wrapper: Correct inline asm for unaligned 64-bit copy): modify checkpatch.pl to ignore spaces before opening brackets when used in inline assembly.
- commit ebef00fa (lint/checkpatch.pl: escape { in perl regex to fix warnings): Unescaped left brace in regex is deprecated, passed through in regex;
Change-Id: Ia2c712c5b1bb5f67953a9098b5a076e31e3bd8d3 Signed-off-by: Martin Roth martinroth@google.com --- util/lint/checkpatch.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/util/lint/checkpatch.pl b/util/lint/checkpatch.pl index 6750595..eb03bc7 100755 --- a/util/lint/checkpatch.pl +++ b/util/lint/checkpatch.pl @@ -3836,11 +3836,12 @@ sub process { # 1. with a type on the left -- int [] a; # 2. at the beginning of a line for slice initialisers -- [0...10] = 5, # 3. inside a curly brace -- = { [0...10] = 5 } +# 4. in an extended asm instruction -- : [r0]"r"(r0) while ($line =~ /(.*?\s)[/g) { my ($where, $prefix) = ($-[1], $1); if ($prefix !~ /$Type\s+$/ && ($where != 0 || $prefix !~ /^.\s+$/) && - $prefix !~ /[{,]\s+$/) { + $prefix !~ /[{,:]\s+$/) { if (ERROR("BRACKET_SPACE", "space prohibited before open square bracket '['\n" . $herecurr) && $fix) { @@ -4709,7 +4710,7 @@ sub process { $dstat !~ /^do\s*$Constant\s*while\s*$Constant;?$/ && # do {...} while (...); // do {...} while (...) $dstat !~ /^for\s*$Constant$/ && # for (...) $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() - $dstat !~ /^do\s*{/ && # do {... + $dstat !~ /^do\s*{/ && # do {... $dstat !~ /^({/ && # ({... $ctx !~ /^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/) {