]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: warn on #defines ending in semicolon
authorJoe Perches <joe@perches.com>
Wed, 4 Jun 2014 23:12:06 +0000 (16:12 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:54:20 +0000 (16:54 -0700)
commit0ac9fda04d4a85c4807b3688327c7f09f02471b8
tree1fe1265d5b6570ba3df3b39b8f2c3a74121e6abb
parent7fc874ee98d6557b5b748781e2f0fc3a5dd3d5d1
checkpatch: warn on #defines ending in semicolon

Using a #define ending in a semicolon is poor style and can lead to
unexpected code paths being executed.

Warn on uses of these #define types:

#define foo[(...)] bar;
#define foo[(...)] \
bar;

Based on a patch from Borislav Petkov.

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