Re: [PATCH -next] arm64/spinlock: fix a -Wunused-function warning

From: Waiman Long
Date: Thu Jan 23 2020 - 12:36:49 EST


On 1/23/20 12:31 PM, Qian Cai wrote:
>
>> On Jan 23, 2020, at 11:56 AM, Will Deacon <will@xxxxxxxxxx> wrote:
>>
>> Damn, the whole point of this was to warn in the case that
>> vcpu_is_preempted() does get defined for arm64. Can we force it to evaluate
>> the macro argument instead (e.g. ({ (cpu), false; }) or something)?
> Actually, static inline should be better.
>
> #define vcpu_is_preempted vcpu_is_preempted
> static inline bool vcpu_is_preempted(int cpu)
> {
> return false;
> }
>
Yes, that may work.

Cheers,
Longman