[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab61de3a04a74f74866683b062d0bab2@huawei.com>
Date: Tue, 14 Jan 2020 02:20:31 +0000
From: linmiaohe <linmiaohe@...wei.com>
To: "maz@...nel.org" <maz@...nel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"james.morse@....com" <james.morse@....com>,
"julien.thierry.kdev@...il.com" <julien.thierry.kdev@...il.com>,
"suzuki.poulose@....com" <suzuki.poulose@....com>,
"christoffer.dall@....com" <christoffer.dall@....com>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"eric.auger@...hat.com" <eric.auger@...hat.com>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"will@...nel.org" <will@...nel.org>,
"andre.przywara@....com" <andre.przywara@....com>,
"tglx@...utronix.de" <tglx@...utronix.de>
CC: linmiaohe <linmiaohe@...wei.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>
Subject: Re: [PATCH] KVM: arm64: get rid of var ret and out jump label in
kvm_arch_vcpu_ioctl_set_guest_debug()
Friendly ping :)
> From: Miaohe Lin <linmiaohe@...wei.com>
>
> The var ret and out jump label is not really needed. Clean them up.
> Signed-off-by: Miaohe Lin <linmiaohe@...wei.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;
> }
>
> int kvm_arm_vcpu_arch_set_attr(struct kvm_vcpu *vcpu,
> --
> 2.19.1
>
Powered by blists - more mailing lists