diff mbox series

[v4,2/7] scsi: ufs: wb: Change wb_enabled condition test

Message ID 20220727070522epcms2p5ad2dd21b471acee963dd58b37d35e11f@epcms2p5 (mailing list archive)
State Superseded
Headers show
Series scsi: ufs: wb: Add sysfs attribute and cleanup | expand

Commit Message

Jinyoung Choi July 27, 2022, 7:05 a.m. UTC
Changed to improve readability.
As implemented in ufshcd_wb_togle_flush(), the conditional test is
modified in the same way.

Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com>
---
 drivers/ufs/core/ufshcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bean Huo July 27, 2022, 1:49 p.m. UTC | #1
On Wed, 2022-07-27 at 16:05 +0900, Jinyoung CHOI wrote:
> Changed to improve readability.
> As implemented in ufshcd_wb_togle_flush(), the conditional test is
> modified in the same way.
> 
> Reviewed-by: Avri Altman <avri.altman@wdc.com>
> Signed-off-by: Jinyoung Choi <j-young.choi@samsung.com>

Reviewed-by: Bean Huo <beanhuo@micron.com>
diff mbox series

Patch

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index a3bdf9986511..48ba109e29f7 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -5733,7 +5733,7 @@  int ufshcd_wb_toggle(struct ufs_hba *hba, bool enable)
 {
 	int ret;
 
-	if (!(enable ^ hba->dev_info.wb_enabled))
+	if (hba->dev_info.wb_enabled == enable)
 		return 0;
 
 	ret = __ufshcd_wb_toggle(hba, enable, QUERY_FLAG_IDN_WB_EN);