From 4babb7490a9c1639da5797c382a55633ad026ff3 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 23 Jul 2008 21:28:57 -0700 Subject: [PATCH] --- yaml --- r: 105381 b: refs/heads/master c: c8cb2ca37ed51aa1f3b20e3eff1e72df1c400f70 h: refs/heads/master i: 105379: 4e1c392feb6a9a2493d8b59209c14c8a087f796e v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 9623a9483d2e..7e664919809d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fee61c47d15270bdea699a8a3dd867f0825c3541 +refs/heads/master: c8cb2ca37ed51aa1f3b20e3eff1e72df1c400f70 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 83ae37b38621..5420db6502fc 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -171,6 +171,7 @@ sub build_types { my $mods = "(?: \n" . join("|\n ", @modifierList) . "\n)"; my $all = "(?: \n" . join("|\n ", @typeList) . "\n)"; + $Modifier = qr{(?:$Attribute|$Sparse|$mods)}; $NonptrType = qr{ (?:const\s+)? (?:$mods\s+)? @@ -178,15 +179,14 @@ sub build_types { (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)| (?:${all}\b) ) - (?:\s+$Sparse|\s+const)* + (?:\s+$Modifier|\s+const)* }x; $Type = qr{ $NonptrType (?:\s*\*+\s*const|\s*\*+|(?:\s*\[\s*\])+)? - (?:\s+$Inline|\s+$Sparse|\s+$Attribute|\s+$mods)* + (?:\s+$Inline|\s+$Modifier)* }x; $Declare = qr{(?:$Storage\s+)?$Type}; - $Modifier = qr{(?:$Attribute|$Sparse|$mods)}; } build_types(); @@ -715,7 +715,7 @@ sub annotate_values { $av_preprocessor = 0; } - } elsif ($cur =~ /^($Type)/) { + } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\))/) { print "DECLARE($1)\n" if ($dbg_values > 1); $type = 'T'; @@ -800,8 +800,9 @@ sub annotate_values { print "PAREN('$1')\n" if ($dbg_values > 1); } - } elsif ($cur =~ /^($Ident)\(/o) { + } elsif ($cur =~ /^($Ident)\s*\(/o) { print "FUNC($1)\n" if ($dbg_values > 1); + $type = 'V'; $av_pending = 'V'; } elsif ($cur =~ /^($Ident|$Constant)/o) {