]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] Let WARN_ON/WARN_ON_ONCE return the condition
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 29 Sep 2006 08:59:06 +0000 (01:59 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Sep 2006 16:18:06 +0000 (09:18 -0700)
commit6aee29199618b43cb2da2ea3a51dc78a9b7833bf
treedb9025d8c6b267565c7110e09b16193957186a48
parentc1e6324ebe6dd06905323e8991a6bf40ad7a3dfc
[PATCH] Let WARN_ON/WARN_ON_ONCE return the condition

Letting WARN_ON/WARN_ON_ONCE return the condition means that you could do

if (WARN_ON(blah)) {
handle_impossible_case
}

Rather than

if (unlikely(blah)) {
WARN_ON(1)
handle_impossible_case
}

I checked all the newly added WARN_ON_ONCE users and none of them test the
return status so we can still change it.

[akpm@osdl.org: warning fix]
[akpm@osdl.org: build fix]
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-generic/bug.h
include/asm-powerpc/bug.h