Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4687639ybl; Mon, 13 Jan 2020 18:41:38 -0800 (PST) X-Google-Smtp-Source: APXvYqz1bioqnhC8FCoohrFhVGyX7ro9HmktzdvrJ3NbsS7RJDUQKAe0iac3Bfm5TilIj5EZwa2K X-Received: by 2002:a54:4896:: with SMTP id r22mr15256110oic.30.1578969698630; Mon, 13 Jan 2020 18:41:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578969698; cv=none; d=google.com; s=arc-20160816; b=eBUJ3WU9GBwmvkJiZOZAsf0gkn3bFycbU/uULmkEWtflZf7nh0oON/OYVawroolf6d EJCLZX4yXqiBmW0auYVYfnGydlV2Bxpc4J258jQXh3wtU6Q+HXDFrN2WPEJiRerUNJnQ PXBLhfHVbrO6+hIA/Ac669R4drebUE5Bv6C2otF12gPqogftnXZhU4jWrBb1xye5ioCs XFYccBVXF7jmsX5MeD2qI3n/qhxESC0078fMPEXC5IZszt/nhp7pOdnbG6nvP9EdrmzM MEvv2XKKZqU2T8LnPkax4KhzjeSAScoYzPjdeFYGf9Yj+o+c3Cir6gPc4cPYxsXGBHlg a3pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=qPjgSKH5CljBqpyg4E2nUcK09JRrpaMvTPDUhlW/MVM=; b=SaRy5cgYUrL47LP1o9NEchhTDkerciFMGjj0SLyeaYW2+KFHxPewtB0HjEuH5j0WZn bZKTfCcjN8fSytKjVQFYs1zjIXFJKs4T7ou/IFjFzaSzlWyPgLimU16O7rV6zpMMjbNM gpCZd/twnL2PiD3Fispbz8fuyJR7Yby0eyeng6qpF84i7yRc9fkNqCovxGoZ3IVz6YsO hRFFWCiNKaWjOKx6U/yp1uk4yTwvpVyJN/9s1xIwUGIHCBthOFMvRzGBKxtFGBDWcJKS exLnG3l9d3DX2zJDasjqMPhYcLeWwHnVmVxqFjhj7dGFO4NV9RIlVxpDEqQ06jiDHaEa nmLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si7907359otp.131.2020.01.13.18.41.27; Mon, 13 Jan 2020 18:41:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729641AbgANCUe convert rfc822-to-8bit (ORCPT + 99 others); Mon, 13 Jan 2020 21:20:34 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:2990 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729030AbgANCUe (ORCPT ); Mon, 13 Jan 2020 21:20:34 -0500 Received: from DGGEMM401-HUB.china.huawei.com (unknown [172.30.72.53]) by Forcepoint Email with ESMTP id 3D32733A036B44FA5CD2; Tue, 14 Jan 2020 10:20:32 +0800 (CST) Received: from dggeme766-chm.china.huawei.com (10.3.19.112) by DGGEMM401-HUB.china.huawei.com (10.3.20.209) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 14 Jan 2020 10:20:32 +0800 Received: from dggeme763-chm.china.huawei.com (10.3.19.109) by dggeme766-chm.china.huawei.com (10.3.19.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 14 Jan 2020 10:20:31 +0800 Received: from dggeme763-chm.china.huawei.com ([10.6.66.36]) by dggeme763-chm.china.huawei.com ([10.6.66.36]) with mapi id 15.01.1713.004; Tue, 14 Jan 2020 10:20:31 +0800 From: linmiaohe To: "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" , "eric.auger@redhat.com" , "gregkh@linuxfoundation.org" , "will@kernel.org" , "andre.przywara@arm.com" , "tglx@linutronix.de" CC: linmiaohe , "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , "linux-kernel@vger.kernel.org" , "kvm@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() Thread-Topic: [PATCH] KVM: arm64: get rid of var ret and out jump label in kvm_arch_vcpu_ioctl_set_guest_debug() Thread-Index: AdXKgQO5ibkFZKiqSOySikptaJRgWA== Date: Tue, 14 Jan 2020 02:20:31 +0000 Message-ID: Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.173.221.158] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Friendly ping :) > From: Miaohe Lin > > The var ret and out jump label is not really needed. Clean them up. > Signed-off-by: Miaohe Lin > --- > 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 >