Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5932942rdb; Thu, 14 Dec 2023 04:06:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtc12KlejmSZu7PS7k4pFvCq1mLtx6D1a9O84h2SMRtwEguYyw1H/LfQxy9hAw670iO8qF X-Received: by 2002:a05:6a21:3281:b0:18f:97c:8a24 with SMTP id yt1-20020a056a21328100b0018f097c8a24mr11571958pzb.79.1702555577329; Thu, 14 Dec 2023 04:06:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702555577; cv=none; d=google.com; s=arc-20160816; b=Z6dMs7Z+pZ97yGE7gZRxycXsY8idESCoi2L6puYDT2xJa9sxT6SQQqTSYnmabzYH5c lt0WL64yvdKjqPLKP2uckHoY/X+3sb/M1xkkiGDYUGYwLSDwBPE+3g+/Z9PP1qffs9dH eOZDvvk5rlpNuAHNc+BZ1JEaF/2RxrQwKnJ+pRgDnpWYNbIFJhn729iH9W7IE4L2fTqG YZfTy1btESZn8XikrCDtSIb1EVOZGBeUI2U3VFGWgJVogySVXZLuTFua3dCiDFG1v4uU sS7i3hBr2LHHYmxjupjl9LIE6+j+jXeZjiGYisH7iNuAJAKcXaDHBJM4JK+MxdDJoTN8 k3Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NQqsg5Mr+JNChUQVxNpy/Gm2CUClgjELFvMP61xKzOI=; fh=C+3yVr5K+1sYN9o4pLc4v8pIxBimO4vd5oCEGeEz7xE=; b=GBuFLlEPHghArWbI9o1M2RDRr37n57pXrwnHxZWp1Mm+zoNFafrQ+DozKRzOZ2yINk OhE4Xg30dLQDTT5evjYZICVniu3MUGdo8fXgl2UKCDkhUTBp/EuB4DGA1TYJ2/AOI1uf s4DNZQ70RzxB4Rby+B6ow69bgitCjBOe7tovd30DnAcvqHk0zQGdwcwGIuQx0XFqDcUV hZdFbFf1G2XPguqBvpTuVYuKIBA789gvQNSK6DMzHvQVzQmrS1C2XPRtvgOyf96Y5yso a7GyoPPqk0WZ1ONksqC5Voe1oAlDHpFvY2khKW4VvJULSkQVaQxHzqzLKSTWZ6U2IfQY s52w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MK7PEfFl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id s16-20020a656910000000b005c6e820b5e6si10614175pgq.771.2023.12.14.04.06.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:06:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MK7PEfFl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7C71C80822C2; Thu, 14 Dec 2023 04:05:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1572893AbjLNMFJ (ORCPT + 99 others); Thu, 14 Dec 2023 07:05:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444191AbjLNMFI (ORCPT ); Thu, 14 Dec 2023 07:05:08 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B96E10A for ; Thu, 14 Dec 2023 04:05:15 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FAD3C433C8; Thu, 14 Dec 2023 12:05:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702555514; bh=PoZg7dwthRu54cxelOx2fInbC9KQc4SVNLq1rSG4o6M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MK7PEfFlMM0ZUC6BHHY/7ZKtMjLkVdjBB0rIoWzcS960SBIFx1aio99zaaXMow0CW wFS11QMbL5aie76SfTiI4hF/lzG4s3XaBDskL8VTDbPz7UZN3pbsskt5VDufjW0csG QLRWUMAOu0ZgjOz52xiBXi9cLIMVCKTey3Eb51KG+cmgPE65Yn8c6xWpXJNFMTs7s2 6UU+aADoti+YI0Y5nSw8JOvfVcLtU27DPxaN+lZXUqK6K2owF3F5vRSPfThPE5DCMp y1aKFI7Q0i6GcbkdptK+qHOHTenDerzKRVUrciC2zg1kLvJ/rCluQ2qkoN9PG23Ajg b5M6OQT/8SYRA== Date: Thu, 14 Dec 2023 17:34:59 +0530 From: Manivannan Sadhasivam To: Chanwoo Lee Cc: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, jejb@linux.ibm.com, martin.petersen@oracle.com, p.zabel@pengutronix.de, linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, grant.jung@samsung.com, jt77.jang@samsung.com, dh0421.hwang@samsung.com, sh043.lee@samsung.com, Andrew Halaney Subject: Re: [PATCH v2] scsi: ufs: qcom: Re-fix for error handling Message-ID: <20231214120459.GD48078@thinkpad> References: <20231214021401.26474-1-cw9316.lee@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231214021401.26474-1-cw9316.lee@samsung.com> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Dec 2023 04:05:34 -0800 (PST) On Thu, Dec 14, 2023 at 11:14:01AM +0900, Chanwoo Lee wrote: > From: ChanWoo Lee > > I modified the code to handle errors. > > The error handling code has been changed from the patch below. > -'commit 031312dbc695 ("scsi: ufs: ufs-qcom: Remove unnecessary goto statements")' > > This is the case I checked. > * ufs_qcom_clk_scale_notify -> 'ufs_qcom_clk_scale_up_/down_pre_change' error -> return 0; > > It is unknown whether the above commit was intended to change error handling. > However, if it is not an intended fix, a patch may be needed. > Fixes: 031312dbc695 ("scsi: ufs: ufs-qcom: Remove unnecessary goto statements") > Signed-off-by: ChanWoo Lee Reviewed-by: Manivannan Sadhasivam Thanks for spotting and fixing the issue! This is one of the reasons why the error path should directly return instead of slipping. - Mani > Reviewed-by: Andrew Halaney > --- > v1->v2: Remove things already in progress > 1) ufs_qcom_host_reset -> 'reset_control_deassert' error -> return 0; > -> https://lore.kernel.org/linux-arm-msm/20231208065902.11006-8-manivannan.sadhasivam@linaro.org/#t > 2) ufs_qcom_init_lane_clks -> 'ufs_qcom_host_clk_get(tx_lane1_sync_clk)' error -> return 0; > -> https://lore.kernel.org/linux-arm-msm/20231208065902.11006-2-manivannan.sadhasivam@linaro.org/ > --- > --- > drivers/ufs/host/ufs-qcom.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c > index 96cb8b5b4e66..17e24270477d 100644 > --- a/drivers/ufs/host/ufs-qcom.c > +++ b/drivers/ufs/host/ufs-qcom.c > @@ -1516,9 +1516,11 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *hba, > err = ufs_qcom_clk_scale_up_pre_change(hba); > else > err = ufs_qcom_clk_scale_down_pre_change(hba); > - if (err) > - ufshcd_uic_hibern8_exit(hba); > > + if (err) { > + ufshcd_uic_hibern8_exit(hba); > + return err; > + } > } else { > if (scale_up) > err = ufs_qcom_clk_scale_up_post_change(hba); > -- > 2.29.0 > > -- மணிவண்ணன் சதாசிவம்