public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] scsi: ufs: qcom: remove unnecessary check
Date: Tue, 10 Oct 2023 17:51:16 +0530	[thread overview]
Message-ID: <20231010122116.GI4884@thinkpad> (raw)
In-Reply-To: <fe3b8fcd-64a7-4887-bddd-32239a88a6a3@moroto.mountain>

On Mon, Oct 02, 2023 at 10:03:35AM +0300, Dan Carpenter wrote:
> The "attr" pointer points to an offset into the "host" struct so it
> can't be NULL.  Delete the if statement and pull the code in a tab.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

- Mani

> ---
>  drivers/ufs/host/ufs-qcom.c | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index 2128db0293b5..96cb8b5b4e66 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -1447,15 +1447,11 @@ static int ufs_qcom_clk_scale_up_pre_change(struct ufs_hba *hba)
>  	if (!ufs_qcom_cap_qunipro(host))
>  		return 0;
>  
> -	if (attr) {
> -		ret = ufs_qcom_cfg_timers(hba, attr->gear_rx,
> -					attr->pwr_rx, attr->hs_rate,
> -					false, true);
> -		if (ret) {
> -			dev_err(hba->dev, "%s ufs cfg timer failed\n",
> -						__func__);
> -			return ret;
> -		}
> +	ret = ufs_qcom_cfg_timers(hba, attr->gear_rx, attr->pwr_rx,
> +				  attr->hs_rate, false, true);
> +	if (ret) {
> +		dev_err(hba->dev, "%s ufs cfg timer failed\n", __func__);
> +		return ret;
>  	}
>  	/* set unipro core clock attributes and clear clock divider */
>  	return ufs_qcom_set_core_clk_ctrl(hba, true);
> -- 
> 2.39.2
> 

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

  parent reply	other threads:[~2023-10-10 12:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02  7:03 [PATCH] scsi: ufs: qcom: remove unnecessary check Dan Carpenter
2023-10-10  1:53 ` Martin K. Petersen
2023-10-10 12:21 ` Manivannan Sadhasivam [this message]
2023-10-13 21:03 ` Martin K. Petersen

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=20231010122116.GI4884@thinkpad \
    --to=mani@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=jejb@linux.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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