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]
Date:   Wed, 1 Mar 2023 10:07:41 -0800
From:   Bart Van Assche <bvanassche@....org>
To:     Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
        jejb@...ux.ibm.com, martin.petersen@...cle.com
Cc:     linux-arm-msm@...r.kernel.org, linux-scsi@...r.kernel.org,
        linux-kernel@...r.kernel.org, quic_asutoshd@...cinc.com
Subject: Re: [PATCH] ufs: host: ufs-qcom: Return directly if MCQ resource is
 provided in DT

On 2/28/23 23:31, Manivannan Sadhasivam wrote:
> Instead of using a goto label to return, let's return directly in the
> "if" condition after setting mcq_base.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
> ---
>   drivers/ufs/host/ufs-qcom.c | 9 ++++-----
>   1 file changed, 4 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index 34fc453f3eb1..d90f963eed02 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -1460,8 +1460,10 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba)
>   	/* MCQ resource provided in DT */
>   	res = &hba->res[RES_MCQ];
>   	/* Bail if MCQ resource is provided */
> -	if (res->base)
> -		goto out;
> +	if (res->base) {
> +		hba->mcq_base = res->base;
> +		return 0;
> +	}
>   
>   	/* Explicitly allocate MCQ resource from ufs_mem */
>   	res_mcq = devm_kzalloc(hba->dev, sizeof(*res_mcq), GFP_KERNEL);
> @@ -1489,9 +1491,6 @@ static int ufs_qcom_mcq_config_resource(struct ufs_hba *hba)
>   		goto ioremap_err;
>   	}
>   
> -out:
> -	hba->mcq_base = res->base;
> -	return 0;
>   ioremap_err:
>   	res->base = NULL;
>   	remove_resource(res_mcq);

This patch changes the behavior for the success case without mentioning 
this in the patch description. So I assume that the behavior change is 
unintentional and hence that this patch should be dropped?

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ