Skip to content

Commit ef8d890

Browse files
Like Xusean-jc
authored andcommitted
KVM: x86: Remove 'return void' expression for 'void function'
The requested info will be stored in 'guest_xsave->region' referenced by the incoming pointer "struct kvm_xsave *guest_xsave", thus there is no need to explicitly use return void expression for a void function "static void kvm_vcpu_ioctl_x86_get_xsave(...)". The issue is caught with [-Wpedantic]. Fixes: 2d287ec ("x86/fpu: Allow caller to constrain xfeatures when copying to uabi buffer") Signed-off-by: Like Xu <likexu@tencent.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Link: https://lore.kernel.org/r/20231007064019.17472-1-likexu@tencent.com Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent ea61294 commit ef8d890

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/kvm/x86.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5411,8 +5411,8 @@ static void kvm_vcpu_ioctl_x86_get_xsave2(struct kvm_vcpu *vcpu,
54115411
static void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu,
54125412
struct kvm_xsave *guest_xsave)
54135413
{
5414-
return kvm_vcpu_ioctl_x86_get_xsave2(vcpu, (void *)guest_xsave->region,
5415-
sizeof(guest_xsave->region));
5414+
kvm_vcpu_ioctl_x86_get_xsave2(vcpu, (void *)guest_xsave->region,
5415+
sizeof(guest_xsave->region));
54165416
}
54175417

54185418
static int kvm_vcpu_ioctl_x86_set_xsave(struct kvm_vcpu *vcpu,

0 commit comments

Comments
 (0)