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.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -1856,7 +1856,10 @@ static inline void set_task_cpu(struct task_struct *p, unsigned int cpu) · 1855 unmodified lines | |||
| 1856 | * running or not. | 1856 | * running or not. |
| 1857 | */ | 1857 | */ |
| 1858 | #ifndef vcpu_is_preempted | 1858 | #ifndef vcpu_is_preempted |
| 1859 | # define vcpu_is_preempted(cpu) false | 1859 | static inline bool vcpu_is_preempted(int cpu) |
| 1860 | { | ||
| 1861 | return false; | ||
| 1862 | } | ||
| 1860 | #endif | 1863 | #endif |
| 1861 | 1864 | ||
| 1862 | extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); | 1865 | extern long sched_setaffinity(pid_t pid, const struct cpumask *new_mask); |