]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: check for space after "else" keyword
authorMichal Zylowski <michal.zylowski@intel.com>
Wed, 22 Aug 2018 04:58:08 +0000 (21:58 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 22 Aug 2018 17:52:49 +0000 (10:52 -0700)
commit595a2b04b95125bf17faa35a254aaaaad9b76ef2
tree01ad0efaeb18b10fae8e0af5df84d2acd0d70d2b
parent146224f0176f2819d488219d54aa458c5a1637d2
checkpatch: check for space after "else" keyword

Current checkpatch implementation permits notation like

} else{

in kernel code.  It looks like oversight and inconsistency in checkpatch
rules (e.g.  instruction like 'do' is tested).

Add regex for checking space after 'else' keyword and trigger error if
space is not present.

Link: http://lkml.kernel.org/r/1533545753-8870-1-git-send-email-michal.zylowski@intel.com
Signed-off-by: Michal Zylowski <michal.zylowski@intel.com>
Acked-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