Skip to content
Commit 507e5141 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds
Browse files

checkpatch: improve "return is not a function" test



Find a few more cases where parentheses are used around the value of a
return statement.

This now uses the "$balanced_parens" test and also makes the test depend
on perl v5.10 and higher.

This now finds return with parenthesis uses the old code did not find
like:

ERROR: return is not a function, parentheses are not required
#211: FILE: arch/m68k/include/asm/sun3xflop.h:211:
+		return ((error == 0) ? 0 : -1);

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Tested-by: default avatarDavid Cohen <david.a.cohen@linux.intel.com>
Acked-by: default avatarDavid Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4783f894
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