From: Auger Eric <eric.auger@redhat.com>
To: linmiaohe <linmiaohe@huawei.com>,
maz@kernel.org, pbonzini@redhat.com, rkrcmar@redhat.com,
james.morse@arm.com, julien.thierry.kdev@gmail.com,
suzuki.poulose@arm.com, christoffer.dall@arm.com,
catalin.marinas@arm.com, gregkh@linuxfoundation.org,
will@kernel.org, andre.przywara@arm.com, tglx@linutronix.de
Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: arm64: get rid of var ret and out jump label in kvm_arch_vcpu_ioctl_set_guest_debug()
Date: Thu, 28 Nov 2019 09:50:51 +0100 [thread overview]
Message-ID: <e0fae674-4bf7-3ad2-a5ab-e490510ce04f@redhat.com> (raw)
In-Reply-To: <1574910582-14405-1-git-send-email-linmiaohe@huawei.com>
Hi,
On 11/28/19 4:09 AM, linmiaohe wrote:
> 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>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Thanks
Eric
> ---
> 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;
> }
>
> int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu,
>
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2019-11-28 8:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2020-01-14 2:20 linmiaohe
2020-01-15 13:58 ` Marc Zyngier
2020-01-16 2:03 linmiaohe
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=e0fae674-4bf7-3ad2-a5ab-e490510ce04f@redhat.com \
--to=eric.auger@redhat.com \
--cc=andre.przywara@arm.com \
--cc=catalin.marinas@arm.com \
--cc=christoffer.dall@arm.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=maz@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).