Thread (3 messages) 3 messages, 3 authors, 2021-03-19
STALE1927d LANDED

[PATCH][RESEND] scsi: ufs-mediatek: Correct operator & -> &&

From: Jian Dong <hidden>
Date: 2021-03-16 12:17:13
Subsystem: scsi subsystem, the rest · Maintainers: "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

From: dongjian <redacted>

The "lpm" and "->enabled" are all bool type, it should be using
operator && rather than bit operator.

Fixes: 488edafb1120 (scsi: ufs-mediatek: Introduce low-power mode for device power supply)

Signed-off-by: dongjian <redacted>
Signed-off-by: Yue Hu <redacted>
---
 drivers/scsi/ufs/ufs-mediatek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/ufs/ufs-mediatek.c b/drivers/scsi/ufs/ufs-mediatek.c
index c55202b..a981f26 100644
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -911,7 +911,7 @@ static void ufs_mtk_vreg_set_lpm(struct ufs_hba *hba, bool lpm)
 	if (!hba->vreg_info.vccq2 || !hba->vreg_info.vcc)
 		return;
 
-	if (lpm & !hba->vreg_info.vcc->enabled)
+	if (lpm && !hba->vreg_info.vcc->enabled)
 		regulator_set_mode(hba->vreg_info.vccq2->reg,
 				   REGULATOR_MODE_IDLE);
 	else if (!lpm)
-- 
1.9.1

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help