From: Andy Whitcroft Date: Tue, 6 Jan 2009 22:41:26 +0000 (-0800) Subject: checkpatch: loosen spacing on typedef function checks X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=8054576dca7e76dd1f58c525af3309cfc9c74454;p=deliverable%2Flinux.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 705a0439b39d..d80b55a6f89b 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/) {