[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210319070916.2254-1-zbestahu@gmail.com>
Date: Fri, 19 Mar 2021 15:09:16 +0800
From: Yue Hu <zbestahu@...il.com>
To: martin.petersen@...cle.com, avri.altman@....com,
jejb@...ux.ibm.com, alim.akhtar@...sung.com,
linux-scsi@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, huyue2@...ong.com, zbestahu@....com
Subject: [PATCH RESEND] scsi: ufs: Remove unnecessary null checks in ufshcd_find_max_sup_active_icc_level()
From: Yue Hu <huyue2@...ong.com>
Since vcc/vccq/vccq2 have already been null checked before using.
Signed-off-by: Yue Hu <huyue2@...ong.com>
---
drivers/scsi/ufs/ufshcd.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 7b3267e..f941bc3 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -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,
--
1.9.1
Powered by blists - more mailing lists