checkpatch: loosen spacing on typedef function checks
authorAndy Whitcroft <apw@canonical.com>
Tue, 6 Jan 2009 22:41:26 +0000 (14:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 6 Jan 2009 23:59:17 +0000 (15:59 -0800)
Loosen spacing checks to correctly detect this valid use of a typedef:

typedef struct rcu_data *(*get_data_func)(int);

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 705a043..d80b55a 100755 (executable)
@@ -1618,7 +1618,7 @@ sub process {
 # check for new typedefs, only function parameters and sparse annotations
 # make sense.
                if ($line =~ /\btypedef\s/ &&
-                   $line !~ /\btypedef\s+$Type\s+\(\s*\*?$Ident\s*\)\s*\(/ &&
+                   $line !~ /\btypedef\s+$Type\s*\(\s*\*?$Ident\s*\)\s*\(/ &&
                    $line !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
                    $line !~ /\b$typeTypedefs\b/ &&
                    $line !~ /\b__bitwise(?:__|)\b/) {