]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/spinlock: fix a -Wunused-function warning
authorQian Cai <cai@lca.pw>
Thu, 23 Jan 2020 20:20:51 +0000 (15:20 -0500)
committerWill Deacon <will@kernel.org>
Mon, 10 Feb 2020 11:29:24 +0000 (11:29 +0000)
commit635798e5f8d89b262731d6fd7d19d317d32edd83
tree4eae3ec94e0d4a3356c97dc0f193c11e6ab7f9cf
parentec577bd54838a998d714b236f745158d29a1f4d4
arm64/spinlock: fix a -Wunused-function warning

The commit dfeac2f8e42e ("locking/osq: Use optimized spinning loop for
arm64") introduced a warning from Clang because vcpu_is_preempted() is
compiled away,

kernel/locking/osq_lock.c:25:19: warning: unused function 'node_cpu'
[-Wunused-function]
static inline int node_cpu(struct optimistic_spin_node *node)
                  ^
1 warning generated.

Fix it by converting vcpu_is_preempted() to a static inline function.

Fixes: dfeac2f8e42e ("locking/osq: Use optimized spinning loop for arm64")
Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Qian Cai <cai@lca.pw>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/spinlock.h