From: Like Xu <like.xu.linux@gmail.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Maxim Levitsky <mlevitsk@redhat.com>
Subject: Re: [PATCH] KVM: x86/xsave: Remove 'return void' expression for 'void function'
Date: Wed, 25 Oct 2023 19:24:36 +0800 [thread overview]
Message-ID: <53d7caba-8b00-42ab-849a-d8c8d94aea37@gmail.com> (raw)
In-Reply-To: <e4d6c6a5030f49f44febf99ba4c7040938c3c483.camel@redhat.com>
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
>
next prev parent reply other threads:[~2023-10-25 11:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-07 6:40 [PATCH] KVM: x86/xsave: Remove 'return void' expression for 'void function' Like Xu
2023-10-10 16:12 ` Maxim Levitsky
2023-10-25 11:24 ` Like Xu [this message]
2023-10-25 14:26 ` Sean Christopherson
2023-10-26 1:10 ` Sean Christopherson
2023-11-30 6:10 ` Like Xu
2023-11-30 16:25 ` Sean Christopherson
2023-12-01 23:30 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53d7caba-8b00-42ab-849a-d8c8d94aea37@gmail.com \
--to=like.xu.linux@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlevitsk@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox