From: Andy Whitcroft Date: Fri, 23 Mar 2012 22:02:18 +0000 (-0700) Subject: checkpatch: add [] to type extensions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b337d8b82f235d0212f7adcaeb431fd4e688bb98;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git checkpatch: add [] to type extensions Add [] to a type extensions. Fixes false positives on: .attrs = (struct attribute *[]) { Signed-off-by: Andy Whitcroft Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index ec58d3152e71..07d718415c5c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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};