sched/core: Convert vcpu_is_preempted() from macro to an inline function
authorQian Cai <cai@lca.pw>
Tue, 17 Sep 2019 14:34:54 +0000 (10:34 -0400)
committerIngo Molnar <mingo@kernel.org>
Wed, 18 Sep 2019 10:38:17 +0000 (12:38 +0200)
commit42fd8baab31f53bed2952485fcf0e92f244c5e55
tree0991daeeb794da8387775c99c9f91e2caef71621
parentdac9f027b1096c5f03ca583e787aac0f852e8f78
sched/core: Convert vcpu_is_preempted() from macro to an inline function

Clang reports this warning:

  kernel/locking/osq_lock.c:25:19: warning: unused function 'node_cpu' [-Wunused-function]

due to osq_lock() calling vcpu_is_preempted(node_cpu(node->prev))), but
vcpu_is_preempted() is compiled away. Fix it by converting the dummy
vcpu_is_preempted() from a macro to a proper static inline function.

Signed-off-by: Qian Cai <cai@lca.pw>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: bsegall@google.com
Cc: dietmar.eggemann@arm.com
Cc: juri.lelli@redhat.com
Cc: rostedt@goodmis.org
Cc: vincent.guittot@linaro.org
Link: https://lkml.kernel.org/r/1568730894-10483-1-git-send-email-cai@lca.pw
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/sched.h