From: Andy Whitcroft Date: Fri, 23 Mar 2012 22:02:18 +0000 (-0700) Subject: checkpatch: add [] to type extensions X-Git-Tag: firefly_0821_release~3680^2~3270^2~70 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b337d8b82f235d0212f7adcaeb431fd4e688bb98;p=firefly-linux-kernel-4.4.55.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};