From: Andy Whitcroft Date: Tue, 6 Jan 2009 22:41:26 +0000 (-0800) Subject: checkpatch: loosen spacing on typedef function checks X-Git-Tag: v2.6.29-rc1~341 X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8054576dca7e76dd1f58c525af3309cfc9c74454;p=linux-2.6-omap-h63xx.git checkpatch: loosen spacing on typedef function checks 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 705a0439b39..d80b55a6f89 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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/) {