Skip to content
Commit 3b5f3c0d authored by Yue Hu's avatar Yue Hu Committed by Martin K. Petersen
Browse files

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: default avatarAvri Altman <avri.altman@wdc.com>
Signed-off-by: default avatarYue Hu <huyue2@yulong.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 69a1709e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment