From: Andy Whitcroft Date: Fri, 23 Mar 2012 22:02:18 +0000 (-0700) Subject: checkpatch: add [] to type extensions X-Git-Tag: v3.4-rc1~109^2~70 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b337d8b82f235d0212f7adcaeb431fd4e688bb98;p=platform%2Fupstream%2Fkernel-adaptation-pc.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 ec58d31..07d7184 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};