From: Yue Hu <huyue2@xxxxxxxxxx> Since ufshcd_wb_ctrl() will spew error/debug log firstly, no need to spew similar error/info log again in the caller ufshcd_wb_config(). Also, several log words in ufshcd_wb_ctrl() are not consistent with other sites, let's improve them. And remove unhelpful ret from debug log due to successful control. Signed-off-by: Yue Hu <huyue2@xxxxxxxxxx> --- drivers/scsi/ufs/ufshcd.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 7716175..991c880 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -280,11 +280,7 @@ static inline void ufshcd_wb_config(struct ufs_hba *hba) if (!ufshcd_is_wb_allowed(hba)) return; - ret = ufshcd_wb_ctrl(hba, true); - if (ret) - dev_err(hba->dev, "%s: Enable WB failed: %d\n", __func__, ret); - else - dev_info(hba->dev, "%s: Write Booster Configured\n", __func__); + ufshcd_wb_ctrl(hba, true); ret = ufshcd_wb_toggle_flush_during_h8(hba, true); if (ret) dev_err(hba->dev, "%s: En WB flush during H8: failed: %d\n", @@ -5452,14 +5448,14 @@ int ufshcd_wb_ctrl(struct ufs_hba *hba, bool enable) ret = ufshcd_query_flag_retry(hba, opcode, QUERY_FLAG_IDN_WB_EN, index, NULL); if (ret) { - dev_err(hba->dev, "%s write booster %s failed %d\n", + dev_err(hba->dev, "%s Write Booster %s failed %d\n", __func__, enable ? "enable" : "disable", ret); return ret; } hba->dev_info.wb_enabled = enable; - dev_dbg(hba->dev, "%s write booster %s %d\n", - __func__, enable ? "enable" : "disable", ret); + dev_dbg(hba->dev, "%s Write Booster %s\n", + __func__, enable ? "enabled" : "disabled"); return ret; } -- 1.9.1