From b337d8b82f235d0212f7adcaeb431fd4e688bb98 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Fri, 23 Mar 2012 15:02:18 -0700 Subject: 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 --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') 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}; -- cgit v1.2.1