diff mbox series

scsi: ufs-qcom: remove unneeded variable 'ret'

Message ID 20200418070625.11756-1-yanaijie@huawei.com (mailing list archive)
State Accepted
Commit f336c7003c84c6ac6db3ccc70b8cf6a588015871
Headers show
Series scsi: ufs-qcom: remove unneeded variable 'ret' | expand

Commit Message

Jason Yan April 18, 2020, 7:06 a.m. UTC
Fix the following coccicheck warning:

drivers/scsi/ufs/ufs-qcom.c:575:5-8: Unneeded variable: "ret". Return
"0" on line 590

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
---
 drivers/scsi/ufs/ufs-qcom.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Bjorn Andersson April 18, 2020, 7:13 a.m. UTC | #1
On Sat 18 Apr 00:06 PDT 2020, Jason Yan wrote:

> Fix the following coccicheck warning:
> 
> drivers/scsi/ufs/ufs-qcom.c:575:5-8: Unneeded variable: "ret". Return
> "0" on line 590
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
>  drivers/scsi/ufs/ufs-qcom.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
> index 19aa5c44e0da..701e9184adff 100644
> --- a/drivers/scsi/ufs/ufs-qcom.c
> +++ b/drivers/scsi/ufs/ufs-qcom.c
> @@ -572,7 +572,6 @@ static int ufs_qcom_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
>  {
>  	struct ufs_qcom_host *host = ufshcd_get_variant(hba);
>  	struct phy *phy = host->generic_phy;
> -	int ret = 0;
>  
>  	if (ufs_qcom_is_link_off(hba)) {
>  		/*
> @@ -587,7 +586,7 @@ static int ufs_qcom_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
>  		ufs_qcom_disable_lane_clks(host);
>  	}
>  
> -	return ret;
> +	return 0;
>  }
>  
>  static int ufs_qcom_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
> -- 
> 2.21.1
>
Martin K. Petersen April 22, 2020, 4:06 a.m. UTC | #2
Jason,

> Fix the following coccicheck warning:
>
> drivers/scsi/ufs/ufs-qcom.c:575:5-8: Unneeded variable: "ret". Return
> "0" on line 590

Applied to 5.8/scsi-queue, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
index 19aa5c44e0da..701e9184adff 100644
--- a/drivers/scsi/ufs/ufs-qcom.c
+++ b/drivers/scsi/ufs/ufs-qcom.c
@@ -572,7 +572,6 @@  static int ufs_qcom_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
 {
 	struct ufs_qcom_host *host = ufshcd_get_variant(hba);
 	struct phy *phy = host->generic_phy;
-	int ret = 0;
 
 	if (ufs_qcom_is_link_off(hba)) {
 		/*
@@ -587,7 +586,7 @@  static int ufs_qcom_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
 		ufs_qcom_disable_lane_clks(host);
 	}
 
-	return ret;
+	return 0;
 }
 
 static int ufs_qcom_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)