lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231220113344.GC3544@thinkpad>
Date: Wed, 20 Dec 2023 17:03:44 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Chanwoo Lee <cw9316.lee@...sung.com>
Cc: agross@...nel.org, andersson@...nel.org, konrad.dybcio@...aro.org,
	jejb@...ux.ibm.com, martin.petersen@...cle.com,
	linux-arm-msm@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org, grant.jung@...sung.com,
	jt77.jang@...sung.com, dh0421.hwang@...sung.com,
	sh043.lee@...sung.com
Subject: Re: [PATCH] scsi: ufs: qcom: Remove unnecessary goto statement from
 ufs_qcom_config_esi function

On Tue, Dec 19, 2023 at 05:27:40PM +0900, Chanwoo Lee wrote:
> From: ChanWoo Lee <cw9316.lee@...sung.com>
> 
> There is only one place where goto is used,
> and it is unnecessary to check the ret value through 'goto out'
> because the ret value is already true.
> 
> Therefore, remove the goto statement and
> integrate the '!ret' condition into the existing code.
> 
> Signed-off-by: ChanWoo Lee <cw9316.lee@...sung.com>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>

- Mani

> ---
>  drivers/ufs/host/ufs-qcom.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index 17e24270477d..8cf803806326 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -1929,7 +1929,7 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba)
>  					     ufs_qcom_write_msi_msg);
>  	if (ret) {
>  		dev_err(hba->dev, "Failed to request Platform MSI %d\n", ret);
> -		goto out;
> +		return ret;
>  	}
>  
>  	msi_lock_descs(hba->dev);
> @@ -1964,11 +1964,8 @@ static int ufs_qcom_config_esi(struct ufs_hba *hba)
>  				      REG_UFS_CFG3);
>  		}
>  		ufshcd_mcq_enable_esi(hba);
> -	}
> -
> -out:
> -	if (!ret)
>  		host->esi_enabled = true;
> +	}
>  
>  	return ret;
>  }
> -- 
> 2.29.0
> 

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ