]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: improve MULTISTATEMENT_MACRO_USE_DO_WHILE test
authorJoe Perches <joe@perches.com>
Mon, 8 May 2017 22:55:48 +0000 (15:55 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 9 May 2017 00:15:11 +0000 (17:15 -0700)
commitaaf8f1cd22e4f348e41f310c4bcfa7e4aca4715d
tree95d899c64140b8046d4dc6ffcec806e77533655d
parentddbdc04bc4c5da7b4a8e5f7a27df53a51fcc0781
checkpatch: improve MULTISTATEMENT_MACRO_USE_DO_WHILE test

The logic currrently misses macros that start with an if statement.

e.g.:    #define foo(bar)   if (bar) baz;

Add a test for macro content that starts with if

Link: http://lkml.kernel.org/r/a9d41aafe1673889caf1a9850208fb7fd74107a0.1491783914.git.joe@perches.com
Signed-off-by: Joe Perches <joe@perches.com>
Reported-by: Andreas Mohr <andi@lisas.de>
Original-patch-by: Alfonso Lima <alfonsolimaastor@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl