]> git.baikalelectronics.ru Git - kernel.git/commit
sched/debug: Fix SCHED_WARN_ON() to return a value on !CONFIG_SCHED_DEBUG as well
authorIngo Molnar <mingo@kernel.org>
Tue, 20 Jun 2017 10:24:42 +0000 (12:24 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 20 Jun 2017 10:26:52 +0000 (12:26 +0200)
commitb04d836e9a5512dc36bea11fcd504613081f0e54
tree9914dcf5efda89292c18705b6c6aa6a15ef7fc7a
parent6907f66c8b927d3f1dd4f2534c2ed773b09c16cc
sched/debug: Fix SCHED_WARN_ON() to return a value on !CONFIG_SCHED_DEBUG as well

This definition of SCHED_WARN_ON():

 #define SCHED_WARN_ON(x)        ((void)(x))

is not fully compatible with the 'real' WARN_ON_ONCE() primitive, as it
has no return value, so it cannot be used in conditionals.

Fix it.

Cc: Daniel Axtens <dja@axtens.net>
Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/sched/sched.h