Commit bf30d6ed authored by Andy Whitcroft's avatar Andy Whitcroft Committed by 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: default avatarAndy Whitcroft <apw@shadowen.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment