Skip to content

Commit

Permalink
checkpatch: add [] to type extensions
Browse files Browse the repository at this point in the history
Add [] to a type extensions.  Fixes false positives on:

    .attrs = (struct attribute *[]) {

Signed-off-by: Andy Whitcroft <[email protected]>
Cc: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Andy Whitcroft authored and torvalds committed Mar 23, 2012
1 parent fd1b57a commit b337d8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ sub build_types {
}x;
$Type = qr{
$NonptrType
(?:[\s\*]+\s*const|[\s\*]+|(?:\s*\[\s*\])+)?
(?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)?
(?:\s+$Inline|\s+$Modifier)*
}x;
$Declare = qr{(?:$Storage\s+)?$Type};
Expand Down

0 comments on commit b337d8b

Please sign in to comment.