]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: add --strict tests for braces, comments and casts
authorJoe Perches <joe@perches.com>
Fri, 23 Mar 2012 22:02:19 +0000 (15:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 23 Mar 2012 23:58:37 +0000 (16:58 -0700)
commit210707caf3ffaf2742b5c5f28e17938d911e8370
tree503836c82abeaed36ad119538fa3cbb7b8d94b24
parentdaafa78a1c684934751aea70a6359404cea40c6d
checkpatch: add --strict tests for braces, comments and casts

Add some more subjective --strict tests.

Add a test for block comments that start with a blank line followed only
by a line with just the comment block initiator.  Prefer a blank line
followed by /* comment...

Add a test for unnecessary spaces after a cast.

Add a test for symmetric uses of braces in if/else blocks.
If one branch needs braces, then all branches should use braces.

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