scsi: ufs: Remove unnecessary null checks in ufshcd_find_max_sup_active_icc_level()
PATCH RESEND 1/1 scsi: ufs: Remove unnecessary null checks in ufshcd_find_max_sup_active_icc_level()
From: Yue Hu <[email protected]>
Since vcc/vccq/vccq2 have already been null checked before using.
Signed-off-by Yue Hu <[email protected]>
--- drivers/scsi/ufs/ufshcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/scsi/ufs/ufshcd.c +3 -3
@@ -7145,19 +7145,19 @@ static u32 ufshcd_find_max_sup_active_icc_level(struct ufs_hba *hba, goto out; } -if (hba->vreg_info.vcc && hba->vreg_info.vcc->max_uA) +if (hba->vreg_info.vcc->max_uA) icc_level =ufshcd_get_max_icc_level ( hba->vreg_info.vcc->max_uA,POWER_DESC_MAX_ACTV_ICC_LVLS -1 , &desc_buf[PWR_DESC_ACTIVE_LVLS_VCC_0 ]); -if (hba->vreg_info.vccq && hba->vreg_info.vccq->max_uA) +if (hba->vreg_info.vccq->max_uA) icc_level =ufshcd_get_max_icc_level ( hba->vreg_info.vccq->max_uA, icc_level, &desc_buf[PWR_DESC_ACTIVE_LVLS_VCCQ_0 ]); -if (hba->vreg_info.vccq2 && hba->vreg_info.vccq2->max_uA) +if (hba->vreg_info.vccq2->max_uA) icc_level = ufshcd_get_max_icc_level( hba->vreg_info.vccq2->max_uA, icc_level,
Signature · 1 line
1.9.1
Martin K. Petersen
AppliedQuoted 1 line · Yue Hu
Since vcc/vccq/vccq2 have already been null checked before using.
Applied to 5.13/scsi-queue, thanks!
[1/1] scsi: ufs: Remove unnecessary null checks in ufshcd_find_max_sup_active_icc_level()
https://git.kernel.org/mkp/scsi/c/0873045f63c4
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering