]> git.baikalelectronics.ru Git - kernel.git/commit
checkpatch: add likely/unlikely comparison misuse test
authorJoe Perches <joe@perches.com>
Fri, 13 Feb 2015 22:38:38 +0000 (14:38 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 14 Feb 2015 05:21:39 +0000 (21:21 -0800)
commitcd405214db299145052a51d43647d74d456cdce1
tree906c5686169c07b1849fe49426b72a57c01f26c9
parentd06d97a5ecf368725295707f4786a80d6ed704df
checkpatch: add likely/unlikely comparison misuse test

Add a test for probably likely/unlikely misuses where the comparison is
likely misplaced

if (likely(foo) > 0)
vs
if (likely(foo > 0))

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Christoph Jaeger <cj@linux.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl