diff options
author | Joe Perches <joe@perches.com> | 2014-04-03 23:49:21 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-04 01:21:14 +0200 |
commit | 5b9553abfc97f923b99868a04c3b3d99a6014163 (patch) | |
tree | 3d54a69799ee4e749d001d33834907b9e76460ae /scripts/gfp-translate | |
parent | checkpatch: ignore networking block comment style first lines in file (diff) | |
download | linux-5b9553abfc97f923b99868a04c3b3d99a6014163.tar.xz linux-5b9553abfc97f923b99868a04c3b3d99a6014163.zip |
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 <joe@perches.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Cc: Monam Agarwal <monamagarwal123@gmail.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/gfp-translate')
0 files changed, 0 insertions, 0 deletions