summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufshcd.h
diff options
context:
space:
mode:
authorYue Hu <huyue2@yulong.com>2021-03-18 10:55:36 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2021-03-19 03:33:48 +0100
commit3b5f3c0d0548b8d963030b8728e380d6d57aa471 (patch)
tree576e70cd24fd3ab3f14767890d4dd33fb7a0e51e /drivers/scsi/ufs/ufshcd.h
parentscsi: fusion: Fix a typo in the file mptbase.h (diff)
downloadlinux-3b5f3c0d0548b8d963030b8728e380d6d57aa471.tar.xz
linux-3b5f3c0d0548b8d963030b8728e380d6d57aa471.zip
scsi: ufs: core: Tidy up WB configuration code
There are similar code implementations for WB configuration in ufshcd_wb_{ctrl, toggle_flush_during_h8, toggle_flush}. Extract the common parts to create a new helper with a flag parameter to reduce code duplication. Meanwhile, rename ufshcd_wb_ctrl() to ufshcd_wb_toggle() for better readability. And remove unnecessary log messages from ufshcd_wb_config() since relevant toggle function will emit messages. Also change ufshcd_wb_toggle_flush{__during_h8} to void type accordingly. Link: https://lore.kernel.org/r/20210318095536.2048-1-zbestahu@gmail.com Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Yue Hu <huyue2@yulong.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r--drivers/scsi/ufs/ufshcd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/ufs/ufshcd.h b/drivers/scsi/ufs/ufshcd.h
index 1af91661dc83..cb72695b77ab 100644
--- a/drivers/scsi/ufs/ufshcd.h
+++ b/drivers/scsi/ufs/ufshcd.h
@@ -1104,7 +1104,7 @@ int ufshcd_exec_raw_upiu_cmd(struct ufs_hba *hba,
u8 *desc_buff, int *buff_len,
enum query_opcode desc_op);
-int ufshcd_wb_ctrl(struct ufs_hba *hba, bool enable);
+int ufshcd_wb_toggle(struct ufs_hba *hba, bool enable);
/* Wrapper functions for safely calling variant operations */
static inline const char *ufshcd_get_var_name(struct ufs_hba *hba)