From: "Alim Akhtar" <alim.akhtar@samsung.com>
To: "'Ram Kumar Dwivedi'" <quic_rdwivedi@quicinc.com>,
<avri.altman@wdc.com>, <bvanassche@acm.org>, <robh@kernel.org>,
<krzk+dt@kernel.org>, <conor+dt@kernel.org>, <mani@kernel.org>,
<James.Bottomley@HansenPartnership.com>,
<martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>
Subject: RE: [PATCH V5 2/4] ufs: ufs-qcom: Remove redundant re-assignment to hs_rate
Date: Wed, 3 Sep 2025 10:23:25 +0530 [thread overview]
Message-ID: <3a9201dc1c8e$affa1c10$0fee5430$@samsung.com> (raw)
In-Reply-To: <20250902164900.21685-3-quic_rdwivedi@quicinc.com>
> -----Original Message-----
> From: Ram Kumar Dwivedi <quic_rdwivedi@quicinc.com>
> Sent: Tuesday, September 2, 2025 10:19 PM
> To: alim.akhtar@samsung.com; avri.altman@wdc.com;
> bvanassche@acm.org; robh@kernel.org; krzk+dt@kernel.org;
> conor+dt@kernel.org; mani@kernel.org;
> James.Bottomley@HansenPartnership.com; martin.petersen@oracle.com
> Cc: linux-scsi@vger.kernel.org; devicetree@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-arm-msm@vger.kernel.org
> Subject: [PATCH V5 2/4] ufs: ufs-qcom: Remove redundant re-assignment to
> hs_rate
>
> Remove the redundant else block that assigns PA_HS_MODE_B to hs_rate,
> as it is already assigned in ufshcd_init_host_params(). This avoids
> unnecessary reassignment and prevents overwriting hs_rate when it is
> explicitly set to a different value.
>
> Signed-off-by: Ram Kumar Dwivedi <quic_rdwivedi@quicinc.com>
> ---
Better to send non-dependent patches separately.
Feel free to add:
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
> drivers/ufs/host/ufs-qcom.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index
> 9574fdc2bb0f..1a93351fb70e 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -494,12 +494,8 @@ static int ufs_qcom_power_up_sequence(struct
> ufs_hba *hba)
> * If the HS-G5 PHY gear is used, update host_params->hs_rate to
> Rate-A,
> * so that the subsequent power mode change shall stick to Rate-A.
> */
> - if (host->hw_ver.major == 0x5) {
> - if (host->phy_gear == UFS_HS_G5)
> - host_params->hs_rate = PA_HS_MODE_A;
> - else
> - host_params->hs_rate = PA_HS_MODE_B;
> - }
> + if (host->hw_ver.major == 0x5 && host->phy_gear == UFS_HS_G5)
> + host_params->hs_rate = PA_HS_MODE_A;
>
> mode = host_params->hs_rate == PA_HS_MODE_B ?
> PHY_MODE_UFS_HS_B : PHY_MODE_UFS_HS_A;
>
> --
> 2.50.1
next prev parent reply other threads:[~2025-09-03 4:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250902164927epcas5p459352c28c0d5c5a4c04bd88345a049f0@epcas5p4.samsung.com>
2025-09-02 16:48 ` [PATCH V5 0/4] Add DT-based gear and rate limiting support Ram Kumar Dwivedi
2025-09-02 16:48 ` [PATCH V5 1/4] ufs: dt-bindings: Document gear and rate limit properties Ram Kumar Dwivedi
2025-09-03 6:44 ` Krzysztof Kozlowski
2025-09-09 14:58 ` Ram Kumar Dwivedi
2025-09-12 15:44 ` Ram Kumar Dwivedi
2025-09-17 14:09 ` Ram Kumar Dwivedi
2025-09-02 16:48 ` [PATCH V5 2/4] ufs: ufs-qcom: Remove redundant re-assignment to hs_rate Ram Kumar Dwivedi
2025-09-03 4:53 ` Alim Akhtar [this message]
2025-09-17 14:29 ` Ram Kumar Dwivedi
2025-09-02 16:48 ` [PATCH V5 3/4] ufs: pltfrm: Allow limiting HS gear and rate via DT Ram Kumar Dwivedi
2025-09-03 4:28 ` Alim Akhtar
2025-09-17 14:14 ` Ram Kumar Dwivedi
2025-09-02 16:49 ` [PATCH V5 4/4] ufs: ufs-qcom: Add support for limiting HS gear and rate Ram Kumar Dwivedi
2025-09-03 4:48 ` [PATCH V5 0/4] Add DT-based gear and rate limiting support Alim Akhtar
2025-09-17 14:19 ` Ram Kumar Dwivedi
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='3a9201dc1c8e$affa1c10$0fee5430$@samsung.com' \
--to=alim.akhtar@samsung.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=quic_rdwivedi@quicinc.com \
--cc=robh@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.