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: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f16fa28f7b
commit
bf30d6ede0
@ -2142,9 +2142,10 @@ sub process {
|
|||||||
$dstat =~ s/\s*$//s;
|
$dstat =~ s/\s*$//s;
|
||||||
|
|
||||||
# Flatten any parentheses and braces
|
# Flatten any parentheses and braces
|
||||||
while ($dstat =~ s/\([^\(\)]*\)/1/) {
|
while ($dstat =~ s/\([^\(\)]*\)/1/ ||
|
||||||
}
|
$dstat =~ s/\{[^\{\}]*\}/1/ ||
|
||||||
while ($dstat =~ s/\{[^\{\}]*\}/1/) {
|
$dstat =~ s/\[[^\{\}]*\]/1/)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
my $exceptions = qr{
|
my $exceptions = qr{
|
||||||
|
Loading…
Reference in New Issue
Block a user