Re: [PATCH] KVM: x86: Fix pointer mistmatch warning when patching RET0 static calls

David Dunn
2022-02-23T22:23:22Z

Reviewed-by: David Dunn <daviddunn@google.com>

On Wed, Feb 23, 2022 at 8:24 AM Sean Christopherson <seanjc@google.com> wrote:

> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 713e08f62385..f285ddb8b66b 100644
> --- a/arch/x86/include/asm/kvm_host.h
> +++ b/arch/x86/include/asm/kvm_host.h
> @@ -1547,8 +1547,8 @@ static inline void kvm_ops_static_call_update(void)
> WARN_ON(!kvm_x86_ops.func); __KVM_X86_OP(func)
> #define KVM_X86_OP_OPTIONAL __KVM_X86_OP
> #define KVM_X86_OP_OPTIONAL_RET0(func) \
> - static_call_update(kvm_x86_##func, kvm_x86_ops.func ? : \
> - (void *) __static_call_return0);
> + static_call_update(kvm_x86_##func, (void *)kvm_x86_ops.func ? : \
> + (void *)__static_call_return0);
> #include <asm/kvm-x86-ops.h>
> #undef __KVM_X86_OP
> }