Commit 8054576d authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds

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: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 080ba929
...@@ -1618,7 +1618,7 @@ sub process { ...@@ -1618,7 +1618,7 @@ sub process {
# check for new typedefs, only function parameters and sparse annotations # check for new typedefs, only function parameters and sparse annotations
# make sense. # make sense.
if ($line =~ /\btypedef\s/ && 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 !~ /\btypedef\s+$Type\s+$Ident\s*\(/ &&
$line !~ /\b$typeTypedefs\b/ && $line !~ /\b$typeTypedefs\b/ &&
$line !~ /\b__bitwise(?:__|)\b/) { $line !~ /\b__bitwise(?:__|)\b/) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment