Commit b337d8b82f235d0212f7adcaeb431fd4e688bb98

Authored by Andy Whitcroft
Committed by Linus Torvalds
1 parent fd1b57ac73

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>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

scripts/checkpatch.pl
... ... @@ -323,7 +323,7 @@
323 323 }x;
324 324 $Type = qr{
325 325 $NonptrType
326   - (?:[\s\*]+\s*const|[\s\*]+|(?:\s*\[\s*\])+)?
  326 + (?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)?
327 327 (?:\s+$Inline|\s+$Modifier)*
328 328 }x;
329 329 $Declare = qr{(?:$Storage\s+)?$Type};