Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5716526rdb; Wed, 13 Dec 2023 18:14:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhTdbncctu8otkPn5sJJ32cUp0gUnlNZkhnDQKSeGusbNPIBaDHC+NSWOum5p9L2Kao5m7 X-Received: by 2002:a05:6830:138a:b0:6d8:a456:d99d with SMTP id d10-20020a056830138a00b006d8a456d99dmr9392609otq.5.1702520064137; Wed, 13 Dec 2023 18:14:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702520064; cv=none; d=google.com; s=arc-20160816; b=LPUjgIr4VPITxJX6VbbcTm8+kffdIr/ssD48m3hP9BVnEPxT9QtvMGpwnmaF57a5WR PBUsplGD+BkbWIFOiUZWCSaG2VQH0AJBmFotnsdFc9mgHMqtyJrj53RHTdj4+f0etRpy LQM65t2TOko7kFxvsCOqnM4xOu7U/+gf9siMlDRb6WltyEB/hHsX9avnQ80GPyltaiZo OS6o1ZMqGC9x+/PiY7yOynyHaIRqufUn5brPpSXtoVN0tRL1zpsYo4vO1+yU8oZ/iTxz S7JM2qB9hGeq1R6/HeoY/v1SZszLuL1l++AqAVX9tuX/mHmJzjF5vzMAPb8XE2kvdoDQ POoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature:dkim-filter; bh=b5/GFqSR2OKWfDwUZwg7iNYOv07a+Rk2uyiw5sDY0+M=; fh=ymM9RLlYqD67nbuXqGiAv5cCufAofyyf6yHwj4grc0g=; b=r1JU/WM6Mo2Zx8P5vnipaMw5oKJ0pwW1RNd27QFHOi5ZP//uhd/ACqwEV+rG3Nh0Tw omNL6jO3wY+OR98yCTW+KifZwck5ItmiWDYembzGYO4oMnGalWng820KxSHkIYhsOFSS y5HW/SM1ngSA5B2hAdIj3eb10qFpkutPD5ZxQmE5DgwNHWsDAUKeL3hHM60xql5M3PQ5 WtMqG1PqSUQyjK0hNm1Zbye8ljsEF1VLmuMeONmCKxmSqkL1R/9iH/dtad+vW+5MintI 7EfU3mERZALfQKRUMlo8mm9Z2unfLGdyDCMhSDqnVxXaTeaGkn/QtqWs0nJJvK47sfBM GJcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=d4gQcron; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id 80-20020a630253000000b005b8ee1c0c68si10448600pgc.605.2023.12.13.18.14.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 18:14:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=d4gQcron; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 888888061CE1; Wed, 13 Dec 2023 18:14:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234093AbjLNCOI (ORCPT + 99 others); Wed, 13 Dec 2023 21:14:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230132AbjLNCOH (ORCPT ); Wed, 13 Dec 2023 21:14:07 -0500 Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58A09D5 for ; Wed, 13 Dec 2023 18:14:11 -0800 (PST) Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20231214021407epoutp020f6b79d571aec1d204edcdaf90e2e38c~gkPZm5KHv2110221102epoutp02B for ; Thu, 14 Dec 2023 02:14:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20231214021407epoutp020f6b79d571aec1d204edcdaf90e2e38c~gkPZm5KHv2110221102epoutp02B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1702520047; bh=b5/GFqSR2OKWfDwUZwg7iNYOv07a+Rk2uyiw5sDY0+M=; h=From:To:Cc:Subject:Date:References:From; b=d4gQcronWbN8/7aqED+PRixLmI09AR9Zv4LTeIsAQFuJXKxUghhC8WW1eTLXqqr9b 9Zmh+CqyT8PeLSPdAG4cC3qMq1+vU4gNJaDEOpWn0a7FLlPs3H/ExuzsI5ZTr6W2wd OiFv+FDRJcX0kFxqQrmFzPAWhYRfJGz8VJvZd+yw= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20231214021406epcas1p4ea5a807d4b6edc0fe361344a50ff6c4d~gkPY1dQSG0793307933epcas1p4Q; Thu, 14 Dec 2023 02:14:06 +0000 (GMT) Received: from epsmgec1p1.samsung.com (unknown [182.195.38.242]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4SrGB56ShFz4x9Q2; Thu, 14 Dec 2023 02:14:05 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmgec1p1.samsung.com (Symantec Messaging Gateway) with SMTP id F2.5E.09731.DE46A756; Thu, 14 Dec 2023 11:14:05 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p3.samsung.com (KnoxPortal) with ESMTPA id 20231214021405epcas1p3cef80b85df56b7bead7f2f2ebd52f4ac~gkPYDUQ9o1539715397epcas1p3t; Thu, 14 Dec 2023 02:14:05 +0000 (GMT) Received: from epsmgms1p2new.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20231214021405epsmtrp12e3823d82bec7125fe1f9a4df51f9f69~gkPYCGKgn1831318313epsmtrp1d; Thu, 14 Dec 2023 02:14:05 +0000 (GMT) X-AuditID: b6c32a36-2ef8ea8000002603-3b-657a64edf331 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2new.samsung.com (Symantec Messaging Gateway) with SMTP id C1.86.08817.DE46A756; Thu, 14 Dec 2023 11:14:05 +0900 (KST) Received: from localhost.localdomain (unknown [10.253.100.232]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20231214021405epsmtip144edfc6369f29825e45063e1b1e10619~gkPXx8rdv3127431274epsmtip1Z; Thu, 14 Dec 2023 02:14:05 +0000 (GMT) From: Chanwoo Lee To: agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mani@kernel.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 Cc: grant.jung@samsung.com, jt77.jang@samsung.com, dh0421.hwang@samsung.com, sh043.lee@samsung.com, ChanWoo Lee , Andrew Halaney Subject: [PATCH v2] scsi: ufs: qcom: Re-fix for error handling Date: Thu, 14 Dec 2023 11:14:01 +0900 Message-Id: <20231214021401.26474-1-cw9316.lee@samsung.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA02Te0xbVRzHOb2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0nsU1f11y9+KhZNOxtzVVd+7A/scXx/v4N xnmHVJ9tnrOSTfRu5flt+VMW5O++O7dvQ/Rt45VdC+uqZ2QsTv1nZ3RFMDGJ+fKWHSxG2Tmm T7XZkudWPLCQXaT2pfnCwUSLuqh5XUbXRU4osRRnJBpqMRcVJwIAGRtIxvsCAAA= X-CMS-MailID: 20231214021405epcas1p3cef80b85df56b7bead7f2f2ebd52f4ac X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20231214021405epcas1p3cef80b85df56b7bead7f2f2ebd52f4ac References: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 13 Dec 2023 18:14:21 -0800 (PST) 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. Signed-off-by: ChanWoo Lee 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