lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210309022703.422-1-zbestahu@gmail.com>
Date:   Tue,  9 Mar 2021 10:27:03 +0800
From:   Yue Hu <zbestahu@...il.com>
To:     jejb@...ux.ibm.com, martin.petersen@...cle.com,
        alim.akhtar@...sung.com, avri.altman@....com,
        stanley.chu@...iatek.com, cang@...eaurora.org, beanhuo@...ron.com,
        jaegeuk@...nel.org, asutoshd@...eaurora.org
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        huyue2@...ong.com, zbestahu@....com
Subject: [PATCH] scsi: ufs: Don't spew log for enabling WB in ufshcd_wb_config()

From: Yue Hu <huyue2@...ong.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@...ong.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ