* [PATCH] scsi: ufs: Don't spew log for enabling WB in ufshcd_wb_config()
@ 2021-03-09 2:27 Yue Hu
0 siblings, 0 replies; only message in thread
From: Yue Hu @ 2021-03-09 2:27 UTC (permalink / raw)
To: jejb, martin.petersen, alim.akhtar, avri.altman, stanley.chu,
cang, beanhuo, jaegeuk, asutoshd
Cc: linux-scsi, linux-kernel, huyue2, zbestahu
From: Yue Hu <huyue2@yulong.com>
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@yulong.com>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-09 2:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-09 2:27 [PATCH] scsi: ufs: Don't spew log for enabling WB in ufshcd_wb_config() Yue Hu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®