summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2012-03-23 23:02:18 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-24 00:58:36 +0100
commitb337d8b82f235d0212f7adcaeb431fd4e688bb98 (patch)
tree1caccc45dbd1edfec3ff4d02e268f76444330ccf /scripts
parentcheckpatch: high precedence operators do not require additional parentheses i... (diff)
downloadlinux-b337d8b82f235d0212f7adcaeb431fd4e688bb98.tar.xz
linux-b337d8b82f235d0212f7adcaeb431fd4e688bb98.zip
checkpatch: add [] to type extensions
Add [] to a type extensions. Fixes false positives on: .attrs = (struct attribute *[]) { Signed-off-by: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
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};