]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: improve macros with flow control test
authorJoe Perches <joe@perches.com>
Wed, 20 Jan 2016 22:59:18 +0000 (14:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jan 2016 01:09:18 +0000 (17:09 -0800)
commit64dc0fbd6edf769626c3f7e685a43489020e276d
treeae17e3fed46d08b563e64fae02d83a555bce4e18
parent3d436164bbb15442c6b8b001c86096f842136ea9
checkpatch: improve macros with flow control test

The current test excludes any macro with ## concatenation from being
reported with hidden flow control.

Some macros are used with return or goto statements along with ##args or
##__VA_ARGS__.  A somewhat common case is a logging macro like
pr_info(fmt, ...) then a return or goto statement.

Check the concatenated variable for args or __VA_ARGS__ and allow those
macros to also be reported when they contain a return or goto.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl