diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 77b293d5ce4fe2e43234ba9d1619ec17c361439f..0147c91fa549e6ab46b68c47b46425b272c37571 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4550,7 +4550,7 @@ sub process { # Flatten any parentheses and braces while ($dstat =~ s/\([^\(\)]*\)/1/ || $dstat =~ s/\{[^\{\}]*\}/1/ || - $dstat =~ s/\[[^\[\]]*\]/1/) + $dstat =~ s/.\[[^\[\]]*\]/1/) { } @@ -4570,7 +4570,8 @@ sub process { union| struct| \.$Ident\s*=\s*| - ^\"|\"$ + ^\"|\"$| + ^\[ }x; #print "REST<$rest> dstat<$dstat> ctx<$ctx>\n"; if ($dstat ne '' &&