checkpatch: catch [ ... ] usage when not at the beginning of definition
[linux-2.6.git] / scripts / checkpatch.pl
index 0ee37bf..061c28e 100755 (executable)
@@ -2391,7 +2391,7 @@ sub process {
                        my ($where, $prefix) = ($-[1], $1);
                        if ($prefix !~ /$Type\s+$/ &&
                            ($where != 0 || $prefix !~ /^.\s+$/) &&
-                           $prefix !~ /{\s+$/) {
+                           $prefix !~ /[{,]\s+$/) {
                                ERROR("BRACKET_SPACE",
                                      "space prohibited before open square bracket '['\n" . $herecurr);
                        }