Re: [PATCH] sched: fix an unused function "node_cpu" warning
From: Mel Gorman
Date: Wed Sep 18 2019 - 04:59:12 EST
On Tue, Sep 17, 2019 at 10:34:54AM -0400, Qian Cai wrote:
> Clang reports a warning,
>
> kernel/locking/osq_lock.c:25:19: warning: unused function 'node_cpu'
> [-Wunused-function]
>
> due to osq_lock() calls 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@xxxxxx>
Acked-by: Mel Gorman <mgorman@xxxxxxx>
--
Mel Gorman
SUSE Labs