提交 bf30d6ed 编写于 作者: A Andy Whitcroft 提交者: Linus Torvalds

checkpatch: complex macros checks miss square brackets

We are missing 'simple' values which include square brackets.  Refactor to
ensure we handle nesting correctly and detect these simple forms.
Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 f16fa28f
......@@ -2142,9 +2142,10 @@ sub process {
$dstat =~ s/\s*$//s;
# Flatten any parentheses and braces
while ($dstat =~ s/\([^\(\)]*\)/1/) {
}
while ($dstat =~ s/\{[^\{\}]*\}/1/) {
while ($dstat =~ s/\([^\(\)]*\)/1/ ||
$dstat =~ s/\{[^\{\}]*\}/1/ ||
$dstat =~ s/\[[^\{\}]*\]/1/)
{
}
my $exceptions = qr{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册