From: Joe Perches Date: Thu, 3 Apr 2014 21:49:21 +0000 (-0700) Subject: checkpatch: make "return is not a function" test quieter X-Git-Tag: v3.15-rc1~106^2~83 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b9553abfc97f923b99868a04c3b3d99a6014163;p=pandora-kernel.git checkpatch: make "return is not a function" test quieter This test is a bit noisy and opinions seem to agree that it should not warn in a lot more situations. It seems people agree that: return (foo || bar); and return foo || bar; are both acceptable style and checkpatch should be silent about them. For now, it warns on parentheses around a simple constant or a single function or a ternary. return (foo); return (foo(bar)); return (foo ? bar : baz); The last ternary test may be quieted in the future. Modify the deparenthesize function to only strip balanced leading and trailing parentheses. Signed-off-by: Joe Perches Cc: Julia Lawall Reviewed-by: Josh Triplett Cc: Monam Agarwal Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed