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:
Andy Whitcroft 2008-10-15 22:02:33 -07:00 коммит произвёл Linus Torvalds
Родитель f16fa28f7b
Коммит bf30d6ede0
1 изменённых файлов: 4 добавлений и 3 удалений

Просмотреть файл

@ -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{