diff mbox series

scsi: ufs: Remove redundant WB enabling check in ufshcd_wb_toggle_flush()

Message ID 20210305091253.314-1-zbestahu@gmail.com
State New
Headers show
Series scsi: ufs: Remove redundant WB enabling check in ufshcd_wb_toggle_flush() | expand

Commit Message

Yue Hu March 5, 2021, 9:12 a.m. UTC
From: Yue Hu <huyue2@yulong.com>

Note that ufshcd_wb_toggle_flush() will be called only in
ufshcd_wb_config() which have already checked if WB is allowed.

Signed-off-by: Yue Hu <huyue2@yulong.com>
---
 drivers/scsi/ufs/ufshcd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 721f55d..2c49344 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -5484,8 +5484,7 @@  static inline int ufshcd_wb_toggle_flush(struct ufs_hba *hba, bool enable)
 	u8 index;
 	enum query_opcode opcode;
 
-	if (!ufshcd_is_wb_allowed(hba) ||
-	    hba->dev_info.wb_buf_flush_enabled == enable)
+	if (hba->dev_info.wb_buf_flush_enabled == enable)
 		return 0;
 
 	if (enable)