From: Manivannan Sadhasivam <mani@kernel.org>
To: Chanwoo Lee <cw9316.lee@samsung.com>
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 <ahalaney@redhat.com>
Subject: Re: [PATCH v2] scsi: ufs: qcom: Re-fix for error handling
Date: Thu, 14 Dec 2023 17:34:59 +0530 [thread overview]
Message-ID: <20231214120459.GD48078@thinkpad> (raw)
In-Reply-To: <20231214021401.26474-1-cw9316.lee@samsung.com>
On Thu, Dec 14, 2023 at 11:14:01AM +0900, Chanwoo Lee wrote:
> From: ChanWoo Lee <cw9316.lee@samsung.com>
>
> 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 <cw9316.lee@samsung.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
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 <ahalaney@redhat.com>
> ---
> 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
>
>
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2023-12-14 12:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20231214021405epcas1p3cef80b85df56b7bead7f2f2ebd52f4ac@epcas1p3.samsung.com>
2023-12-14 2:14 ` [PATCH v2] scsi: ufs: qcom: Re-fix for error handling Chanwoo Lee
2023-12-14 12:04 ` Manivannan Sadhasivam [this message]
2023-12-14 18:57 ` Andrew Halaney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231214120459.GD48078@thinkpad \
--to=mani@kernel.org \
--cc=agross@kernel.org \
--cc=ahalaney@redhat.com \
--cc=andersson@kernel.org \
--cc=cw9316.lee@samsung.com \
--cc=dh0421.hwang@samsung.com \
--cc=grant.jung@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=jt77.jang@samsung.com \
--cc=konrad.dybcio@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=p.zabel@pengutronix.de \
--cc=sh043.lee@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.