mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	jejb@linux.ibm.com, martin.petersen@oracle.com
Cc: linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, quic_asutoshd@quicinc.com
Subject: Re: [PATCH] ufs: host: ufs-qcom: Return directly if MCQ resource is provided in DT
Date: Wed, 1 Mar 2023 10:07:41 -0800	[thread overview]
Message-ID: <a3c08b5f-b8cb-fdd9-eb60-b1adc2879fff@acm.org> (raw)
In-Reply-To: <20230301073110.9083-1-manivannan.sadhasivam@linaro.org>

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@linaro.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.

  reply	other threads:[~2023-03-01 18:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01  7:31 Manivannan Sadhasivam
2023-03-01 18:07 ` Bart Van Assche [this message]
2023-03-02  7:26   ` Manivannan Sadhasivam

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=a3c08b5f-b8cb-fdd9-eb60-b1adc2879fff@acm.org \
    --to=bvanassche@acm.org \
    --cc=jejb@linux.ibm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=martin.petersen@oracle.com \
    --cc=quic_asutoshd@quicinc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®