lkml.org 
[lkml]   [2023]   [Oct]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] KVM: x86/xsave: Remove 'return void' expression for 'void function'
From
Emm, did we miss this little fix ?

On 11/10/2023 12:12 am, Maxim Levitsky wrote:
> У сб, 2023-10-07 у 14:40 +0800, Like Xu пише:
>> From: Like Xu <likexu@tencent.com>
>>
>> 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: 2d287ec65e79 ("x86/fpu: Allow caller to constrain xfeatures when copying to uabi buffer")
>> Signed-off-by: Like Xu <likexu@tencent.com>
>> ---
>> arch/x86/kvm/x86.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
>> index fdb2b0e61c43..2571466a317f 100644
>> --- a/arch/x86/kvm/x86.c
>> +++ b/arch/x86/kvm/x86.c
>> @@ -5503,8 +5503,8 @@ static void kvm_vcpu_ioctl_x86_get_xsave2(struct kvm_vcpu *vcpu,
>> static void kvm_vcpu_ioctl_x86_get_xsave(struct kvm_vcpu *vcpu,
>> struct kvm_xsave *guest_xsave)
>> {
>> - return kvm_vcpu_ioctl_x86_get_xsave2(vcpu, (void *)guest_xsave->region,
>> - sizeof(guest_xsave->region));
>> + kvm_vcpu_ioctl_x86_get_xsave2(vcpu, (void *)guest_xsave->region,
>> + sizeof(guest_xsave->region));
>> }
>>
>> static int kvm_vcpu_ioctl_x86_set_xsave(struct kvm_vcpu *vcpu,
>>
>> base-commit: 86701e115030e020a052216baa942e8547e0b487
> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
>
> Best regards,
> Maxim Levitsky
>

\
 
 \ /
  Last update: 2023-10-25 13:25    [W:0.092 / U:2.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site