From: Jian Dong <dj0227@163.com>
To: stanley.chu@mediatek.com, jejb@linux.ibm.com,
martin.petersen@oracle.com, matthias.bgg@gmail.com
Cc: linux-scsi@vger.kernel.org, dongjian <dongjian@yulong.com>,
Yue Hu <huyue2@yulong.com>
Subject: [PATCH][RESEND] scsi: ufs-mediatek: Correct operator & -> &&
Date: Tue, 16 Mar 2021 20:15:15 +0800 [thread overview]
Message-ID: <1615896915-148864-1-git-send-email-dj0227@163.com> (raw)
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
next reply other threads:[~2021-03-16 12:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-16 12:15 Jian Dong [this message]
2021-03-16 13:54 ` [PATCH][RESEND] scsi: ufs-mediatek: Correct operator & -> && Avri Altman
2021-03-19 3:45 ` [RESEND] " Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1615896915-148864-1-git-send-email-dj0227@163.com \
--to=dj0227@163.com \
--cc=dongjian@yulong.com \
--cc=huyue2@yulong.com \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=stanley.chu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).