linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: linmiaohe <linmiaohe@huawei.com>
Cc: kvm@vger.kernel.org, suzuki.poulose@arm.com,
	catalin.marinas@arm.com, rkrcmar@redhat.com,
	christoffer.dall@arm.com, linux-kernel@vger.kernel.org,
	eric.auger@redhat.com, andre.przywara@arm.com,
	james.morse@arm.com, linux-arm-kernel@lists.infradead.org,
	gregkh@linuxfoundation.org, pbonzini@redhat.com,
	tglx@linutronix.de, will@kernel.org,
	kvmarm@lists.cs.columbia.edu, julien.thierry.kdev@gmail.com
Subject: Re: [PATCH] KVM: arm64: get rid of var ret and out jump label in kvm_arch_vcpu_ioctl_set_guest_debug()
Date: Wed, 15 Jan 2020 13:58:56 +0000	[thread overview]
Message-ID: <728a5ea123bf6f55b1653e4ccac76175@kernel.org> (raw)
In-Reply-To: <ab61de3a04a74f74866683b062d0bab2@huawei.com>

On 2020-01-14 02:20, linmiaohe wrote:
> Friendly ping :)

Friendly reply:

>> From: Miaohe Lin <linmiaohe@huawei.com>
>> 
>> The var ret and out jump label is not really needed. Clean them up.
>> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
>> ---
>>  arch/arm64/kvm/guest.c | 11 +++--------
>>  1 file changed, 3 insertions(+), 8 deletions(-)
>> 
>> diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c index 
>> 2fff06114a8f..3b836c91609e 100644
>> --- a/arch/arm64/kvm/guest.c
>> +++ b/arch/arm64/kvm/guest.c
>> @@ -834,14 +834,10 @@ int kvm_arch_vcpu_ioctl_translate(struct 
>> kvm_vcpu *vcpu,  int kvm_arch_vcpu_ioctl_set_guest_debug(struct 
>> kvm_vcpu *vcpu,
>>  					struct kvm_guest_debug *dbg)
>>  {
>> -	int ret = 0;
>> -
>>  	trace_kvm_set_guest_debug(vcpu, dbg->control);
>> 
>> -	if (dbg->control & ~KVM_GUESTDBG_VALID_MASK) {
>> -		ret = -EINVAL;
>> -		goto out;
>> -	}
>> +	if (dbg->control & ~KVM_GUESTDBG_VALID_MASK)
>> +		return -EINVAL;
>> 
>>  	if (dbg->control & KVM_GUESTDBG_ENABLE) {
>>  		vcpu->guest_debug = dbg->control;
>> @@ -856,8 +852,7 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct 
>> kvm_vcpu *vcpu,
>>  		vcpu->guest_debug = 0;
>>  	}
>> 
>> -out:
>> -	return ret;
>> +	return 0;

I don't think there is anything wrong with the existing code.
It may not be to your own taste, but is in keeping with a lot
of the KVM code.

If you were making changes to this code, I wouldn't object.
But on its own, this is just churn.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

       reply	other threads:[~2020-01-15 13:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ab61de3a04a74f74866683b062d0bab2@huawei.com>
2020-01-15 13:58 ` Marc Zyngier [this message]
2019-11-28  3:09 [PATCH] KVM: arm64: get rid of var ret and out jump label in kvm_arch_vcpu_ioctl_set_guest_debug() linmiaohe
2019-11-28  8:50 ` Auger Eric

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=728a5ea123bf6f55b1653e4ccac76175@kernel.org \
    --to=maz@kernel.org \
    --cc=andre.przywara@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=christoffer.dall@arm.com \
    --cc=eric.auger@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=james.morse@arm.com \
    --cc=julien.thierry.kdev@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=linmiaohe@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).