Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp265974ybe; Wed, 18 Sep 2019 16:54:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwoLks6FQMISrqleHxeP9+JCzyKx2dr8EfscTTzF7Tm9LpZjF0I+UBENSZei1Uo4bOPpIdR X-Received: by 2002:a50:d5c5:: with SMTP id g5mr13301537edj.57.1568850896569; Wed, 18 Sep 2019 16:54:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568850896; cv=none; d=google.com; s=arc-20160816; b=gFfQ4qewHcgtt2ikpTJ5ImYiFUQuyFKQq+Vmga+1IJdU4qNOES2Mdb+kqXC5XFCfG/ zC9SR0Depzzacx6Pe4brry4pRLJ7z12whbV0YLAqWtJxoB0VfL+oiUeJsVFNtyYe3Inr 5WIaHpNetuhouzbf9iF6qG36O7NhSnZiGlWuuvLOJUpFVuOE3FZk/CPGSHQWBa1kaAMX akR4oStrehZzWqnwzcBAG0JAaHWoay2T+iG1ADlm8sE4b1AEBCiPc+djKkpQCg48ZUox 6DTv+NKhk+BGtD5J2kPNAnB4PZLbFG7P6UWD48ijM36pbKYzwayKGNmo8CjPi8I04zUj v4LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=6fmLdeQWJXUhAI/MQkZ+1y/65IEB+51Jyx260Y6BvoM=; b=VR9pRfcziY12Q6YQXs7NbVLMl3bkVgbPmyk9Kofi6ZdSDTeFDluz+6QjCMw2Fllnss 4te6bf1oBszP19+z/H5OY7BeOcDA8117BZZxFpYC64bRG89w1aQv+W1tH5K0DyXwLWmF 7TRtso8lxE82o8aYiq1LergxDAXPKDytkO4MSZuWCKEm+mW5gk/e7Nk5vR2B+5hmDUeT YbAIyAbR+EX4DsS8YMsG9XYvoFeqZgdVd0WfYwCv7Y1KCb0zHJjmmwv8sKfBMrRe1Tzr kPMDsiU3q1L79lyKRR9K02PiBbVZ/ZbwkH04eeRZKk/JRdjlgwKOnlDJWHK1rwKSmzP4 sf4g== 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 u6si3780033eds.173.2019.09.18.16.54.33; Wed, 18 Sep 2019 16:54:56 -0700 (PDT) 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 S1731880AbfIRWuI (ORCPT + 99 others); Wed, 18 Sep 2019 18:50:08 -0400 Received: from 6.mo179.mail-out.ovh.net ([46.105.56.76]:47269 "EHLO 6.mo179.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727100AbfIRWuH (ORCPT ); Wed, 18 Sep 2019 18:50:07 -0400 X-Greylist: delayed 3599 seconds by postgrey-1.27 at vger.kernel.org; Wed, 18 Sep 2019 18:50:07 EDT Received: from player758.ha.ovh.net (unknown [10.109.146.175]) by mo179.mail-out.ovh.net (Postfix) with ESMTP id C16C7140DA4 for ; Wed, 18 Sep 2019 22:55:06 +0200 (CEST) Received: from kaod.org (lns-bzn-46-82-253-208-248.adsl.proxad.net [82.253.208.248]) (Authenticated sender: groug@kaod.org) by player758.ha.ovh.net (Postfix) with ESMTPSA id C6E4AA0042D8; Wed, 18 Sep 2019 20:55:00 +0000 (UTC) Date: Wed, 18 Sep 2019 22:54:59 +0200 From: Greg Kurz To: Thomas Huth Cc: Paul Mackerras , kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Jiri Kosina Subject: Re: [PATCH trivial] KVM: PPC: Remove superfluous check for non-zero return value Message-ID: <20190918225459.0f1091ad@bahia.lan> In-Reply-To: <20190918184436.5323298d@bahia.lan> References: <20190911195235.29048-1-thuth@redhat.com> <20190918184436.5323298d@bahia.lan> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 11072662635729164594 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrudekgdduheehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 18 Sep 2019 18:44:36 +0200 Greg Kurz wrote: > On Wed, 11 Sep 2019 21:52:35 +0200 > Thomas Huth wrote: > > > After the kfree()s haven been removed in the previous > > commit 9798f4ea71ea ("fix rollback when kvmppc_xive_create fails"), > > the code can be simplified even more to simply always "return ret" > > now. > > > > Signed-off-by: Thomas Huth > > --- > > This looks like a good candidate for trivial, hence Cc'ing Jiri > and adding trivial keyword in subject. > > Reviewed-by: Greg Kurz > Oops, the patch is correct but there are some fixes that require the return 0 to stay around... https://patchwork.ozlabs.org/project/kvm-ppc/list/?series=129957 > > arch/powerpc/kvm/book3s_xive.c | 5 +---- > > arch/powerpc/kvm/book3s_xive_native.c | 5 +---- > > 2 files changed, 2 insertions(+), 8 deletions(-) > > > > diff --git a/arch/powerpc/kvm/book3s_xive.c b/arch/powerpc/kvm/book3s_xive.c > > index e3ba67095895..2f6f463fcdfb 100644 > > --- a/arch/powerpc/kvm/book3s_xive.c > > +++ b/arch/powerpc/kvm/book3s_xive.c > > @@ -1986,10 +1986,7 @@ static int kvmppc_xive_create(struct kvm_device *dev, u32 type) > > > > xive->single_escalation = xive_native_has_single_escalation(); > > > > - if (ret) > > - return ret; > > - > > - return 0; > > + return ret; > > } > > > > int kvmppc_xive_debug_show_queues(struct seq_file *m, struct kvm_vcpu *vcpu) > > diff --git a/arch/powerpc/kvm/book3s_xive_native.c b/arch/powerpc/kvm/book3s_xive_native.c > > index a998823f68a3..7a50772f26fe 100644 > > --- a/arch/powerpc/kvm/book3s_xive_native.c > > +++ b/arch/powerpc/kvm/book3s_xive_native.c > > @@ -1089,10 +1089,7 @@ static int kvmppc_xive_native_create(struct kvm_device *dev, u32 type) > > xive->single_escalation = xive_native_has_single_escalation(); > > xive->ops = &kvmppc_xive_native_ops; > > > > - if (ret) > > - return ret; > > - > > - return 0; > > + return ret; > > } > > > > /* >