[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210322121935.590470655@linuxfoundation.org>
Date: Mon, 22 Mar 2021 13:26:55 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Avri Altman <avri.altman@....com>,
dongjian <dongjian@...ong.com>, Yue Hu <huyue2@...ong.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>
Subject: [PATCH 5.10 058/157] scsi: ufs: ufs-mediatek: Correct operator & -> &&
From: dongjian <dongjian@...ong.com>
commit 0fdc7d5d8f3719950478cca452cf7f0f1355be10 upstream.
The "lpm" and "->enabled" are all boolean. We should be using &&
rather than the bit operator.
Link: https://lore.kernel.org/r/1615896915-148864-1-git-send-email-dj0227@163.com
Fixes: 488edafb1120 ("scsi: ufs-mediatek: Introduce low-power mode for device power supply")
Reviewed-by: Avri Altman <avri.altman@....com>
Signed-off-by: dongjian <dongjian@...ong.com>
Signed-off-by: Yue Hu <huyue2@...ong.com>
Signed-off-by: Martin K. Petersen <martin.petersen@...cle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/scsi/ufs/ufs-mediatek.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/scsi/ufs/ufs-mediatek.c
+++ b/drivers/scsi/ufs/ufs-mediatek.c
@@ -813,7 +813,7 @@ static void ufs_mtk_vreg_set_lpm(struct
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)
Powered by blists - more mailing lists