Skip to content

Commit b337d8b

Browse files
Andy Whitcrofttorvalds
authored andcommitted
checkpatch: add [] to type extensions
Add [] to a type extensions. Fixes false positives on: .attrs = (struct attribute *[]) { Signed-off-by: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent fd1b57a commit b337d8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/checkpatch.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ sub build_types {
323323
}x;
324324
$Type = qr{
325325
$NonptrType
326-
(?:[\s\*]+\s*const|[\s\*]+|(?:\s*\[\s*\])+)?
326+
(?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)?
327327
(?:\s+$Inline|\s+$Modifier)*
328328
}x;
329329
$Declare = qr{(?:$Storage\s+)?$Type};

0 commit comments

Comments
 (0)