mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
arm64/spinlock: fix a -Wunused-function warning
The commitf5bfdc8e39("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:f5bfdc8e39("locking/osq: Use optimized spinning loop for arm64") Acked-by: Waiman Long <[email protected]> Signed-off-by: Qian Cai <[email protected]> Signed-off-by: Will Deacon <[email protected]>
This commit is contained in:
1 parent
fca3d33d8a
commit
345d52c184
1 file changed
+5
-1
@@ -18,6 +18,10 @@
|
||||
* See:
|
||||
* https://lore.kernel.org/lkml/[email protected]
|
||||
*/
|
||||
#define vcpu_is_preempted(cpu) false
|
||||
#define vcpu_is_preempted vcpu_is_preempted
|
||||
static inline bool vcpu_is_preempted(int cpu)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif /* __ASM_SPINLOCK_H */
|
||||
Reference in new issue
Block a user