linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][RESEND] scsi: ufs-mediatek: Correct operator & -> &&
@ 2021-03-16 12:15 Jian Dong
  2021-03-16 13:54 ` Avri Altman
  2021-03-19  3:45 ` [RESEND] " Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Jian Dong @ 2021-03-16 12:15 UTC (permalink / raw)
  To: stanley.chu, jejb, martin.petersen, matthias.bgg
  Cc: linux-scsi, dongjian, Yue Hu

From: dongjian <dongjian@yulong.com>

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 <dongjian@yulong.com>
Signed-off-by: Yue Hu <huyue2@yulong.com>
---
 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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-19  3:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-16 12:15 [PATCH][RESEND] scsi: ufs-mediatek: Correct operator & -> && Jian Dong
2021-03-16 13:54 ` Avri Altman
2021-03-19  3:45 ` [RESEND] " Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).