Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp558843pxa; Fri, 14 Aug 2020 11:15:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0b4bzW70EIfvKNvj9WskYqGu1ysojf/lNbOA92X19w3yWfqOsD/3IGLem4YXTg8o3kugG X-Received: by 2002:a17:906:7798:: with SMTP id s24mr3606425ejm.45.1597428949382; Fri, 14 Aug 2020 11:15:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597428949; cv=none; d=google.com; s=arc-20160816; b=EirYPqLmQiRVL227/BHaAGH7IpooNdhGQx3pFQfjLWTEeNiRpXMc9kSZbmAavUPev1 qc8Zs/xlkrP6JDOoNnTy811ARXzSGqOjjQWI5Uouz1XhbgiMpv9cRslkcxwejWrgP9Eb 3MZXWgpK9SCoeZQNukK2qp5hg1IvYhjuJckpvMC5wKWhc1JZUFqB7p9XA4PF9McNBOHn I4+Iw/ogn+3XErRG02phTRrR1KaxDRY22x0zKuZUTUtgceC0gbhuF7LrjM50Y3hQblE/ fqP8p29TqSuwiHyCc9NXl9Yy87WGMA6RQUdomdS9UBXBr9p/ydVhuvrAPosnksQwEggu 3y2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dmarc-filter:dkim-signature; bh=0agT3+BVjCUaOQoCutKPeNabu7umEQg+D+MeTbkr8i4=; b=0PYtE7ZNmKfzhCf+PgdPTePwXMpRSEqwm2LD5LaDsRPAdpwu0j3f3hT+dQJAul3EAM UpOAyaTAnlq7M0POuyZPVa8lx5TOgeQFkJouSPPrIonPe3uWQaN2tR5QLjy+PEDnpQvQ AfmVUI7uVgqKrgZUzTNHs2QNxPZ4f0/oPF14k6domreS9CdQ3K7eUp4cmBCvF6XWCb0n do6S1dRYgk5b01KRDKyIrZhp2xsj7rCu6WgU3nqKOaI3jKTrtus+MKeK5ZaTRPMbFOG/ UsgRoGIZtT5oDApQ1b/5egCKUIqqPwhpOrZc7u281HR5znuNTi8ls3mX1uu7gXM8sOVi 25Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=Bd2bFT0Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bc16si5833765edb.161.2020.08.14.11.15.26; Fri, 14 Aug 2020 11:15:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=Bd2bFT0Z; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728099AbgHNQyI (ORCPT + 99 others); Fri, 14 Aug 2020 12:54:08 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:14488 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726641AbgHNQyH (ORCPT ); Fri, 14 Aug 2020 12:54:07 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1597424047; h=In-Reply-To: Content-Type: MIME-Version: References: Message-ID: Subject: Cc: To: From: Date: Sender; bh=0agT3+BVjCUaOQoCutKPeNabu7umEQg+D+MeTbkr8i4=; b=Bd2bFT0ZIclpmzCJHoiP2gZ2AFdd0uggYKxA6S2bCDlnXNx+DwniJRawHps0g8SyleJLxi4K SuOASjEV9BgZi6n8rsy5tcBOv5aBsTJUDFo/mq1/og3D7Q8whYBMBA1zc16kl0+18bOZuzEs WAODWxwbnd33b6XLRddXbyWJeC8= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n01.prod.us-west-2.postgun.com with SMTP id 5f36c1ae3f2ce11020983f5a (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Fri, 14 Aug 2020 16:54:06 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id E1B08C4339C; Fri, 14 Aug 2020 16:54:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from asutoshd-linux1.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: asutoshd) by smtp.codeaurora.org (Postfix) with ESMTPSA id 6C86AC433C9; Fri, 14 Aug 2020 16:54:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6C86AC433C9 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=asutoshd@codeaurora.org Date: Fri, 14 Aug 2020 09:54:02 -0700 From: Asutosh Das To: Bean Huo Cc: alim.akhtar@samsung.com, avri.altman@wdc.com, jejb@linux.ibm.com, martin.petersen@oracle.com, stanley.chu@mediatek.com, beanhuo@micron.com, bvanassche@acm.org, tomas.winkler@intel.com, cang@codeaurora.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/2] scsi: ufs: remove several redundant goto statements Message-ID: <20200814165402.GB1217@asutoshd-linux1.qualcomm.com> References: <20200814095034.20709-1-huobean@gmail.com> <20200814095034.20709-3-huobean@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200814095034.20709-3-huobean@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 14 2020 at 02:50 -0700, Bean Huo wrote: >From: Bean Huo > >Signed-off-by: Bean Huo Reviewed-by: Asutosh Das >--- > drivers/scsi/ufs/ufshcd.c | 25 +++++-------------------- > 1 file changed, 5 insertions(+), 20 deletions(-) > >diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c >index e3663b85e8ee..79b216c012d3 100644 >--- a/drivers/scsi/ufs/ufshcd.c >+++ b/drivers/scsi/ufs/ufshcd.c >@@ -4256,10 +4256,8 @@ int ufshcd_make_hba_operational(struct ufs_hba *hba) > dev_err(hba->dev, > "Host controller not ready to process requests"); > err = -EIO; >- goto out; > } > >-out: > return err; > } > EXPORT_SYMBOL_GPL(ufshcd_make_hba_operational); >@@ -5542,10 +5540,8 @@ static bool ufshcd_quirk_dl_nac_errors(struct ufs_hba *hba) > hba->saved_err &= ~UIC_ERROR; > /* clear NAC error */ > hba->saved_uic_err &= ~UFSHCD_UIC_DL_NAC_RECEIVED_ERROR; >- if (!hba->saved_uic_err) { >+ if (!hba->saved_uic_err) > err_handling = false; >- goto out; >- } > } > out: > spin_unlock_irqrestore(hba->host->host_lock, flags); >@@ -7604,12 +7600,10 @@ static int ufshcd_config_vreg(struct device *dev, > if (vreg->min_uV && vreg->max_uV) { > min_uV = on ? vreg->min_uV : 0; > ret = regulator_set_voltage(reg, min_uV, vreg->max_uV); >- if (ret) { >+ if (ret) > dev_err(dev, > "%s: %s set voltage failed, err=%d\n", > __func__, name, ret); >- goto out; >- } > } > } > out: >@@ -7672,8 +7666,6 @@ static int ufshcd_setup_vreg(struct ufs_hba *hba, bool on) > goto out; > > ret = ufshcd_toggle_vreg(dev, info->vccq2, on); >- if (ret) >- goto out; > > out: > if (ret) { >@@ -7719,10 +7711,8 @@ static int ufshcd_init_vreg(struct ufs_hba *hba) > goto out; > > ret = ufshcd_get_vreg(dev, info->vccq); >- if (ret) >- goto out; >- >- ret = ufshcd_get_vreg(dev, info->vccq2); >+ if (!ret) >+ ret = ufshcd_get_vreg(dev, info->vccq2); > out: > return ret; > } >@@ -7866,12 +7856,7 @@ static int ufshcd_variant_hba_init(struct ufs_hba *hba) > > err = ufshcd_vops_setup_regulators(hba, true); > if (err) >- goto out_exit; >- >- goto out; >- >-out_exit: >- ufshcd_vops_exit(hba); >+ ufshcd_vops_exit(hba); > out: > if (err) > dev_err(hba->dev, "%s: variant %s init failed err %d\n", >-- >2.17.1 >