Skip to content

Commit d471a07

Browse files
Ram Kumar Dwivedimartinkpetersen
authored andcommitted
scsi: 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. Reviewed-by: Alim Akhtar <[email protected]> Signed-off-by: Ram Kumar Dwivedi <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 9194566 commit d471a07

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/ufs/host/ufs-qcom.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -494,12 +494,8 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)
494494
* If the HS-G5 PHY gear is used, update host_params->hs_rate to Rate-A,
495495
* so that the subsequent power mode change shall stick to Rate-A.
496496
*/
497-
if (host->hw_ver.major == 0x5) {
498-
if (host->phy_gear == UFS_HS_G5)
499-
host_params->hs_rate = PA_HS_MODE_A;
500-
else
501-
host_params->hs_rate = PA_HS_MODE_B;
502-
}
497+
if (host->hw_ver.major == 0x5 && host->phy_gear == UFS_HS_G5)
498+
host_params->hs_rate = PA_HS_MODE_A;
503499

504500
mode = host_params->hs_rate == PA_HS_MODE_B ? PHY_MODE_UFS_HS_B : PHY_MODE_UFS_HS_A;
505501

0 commit comments

Comments
 (0)