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:
Родитель
f16fa28f7b
Коммит
bf30d6ede0
|
@ -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{
|
||||
|
|
Загрузка…
Ссылка в новой задаче