From: "James A. MacInnes" <james.a.macinnes@gmail.com>
To: sre@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "James A. MacInnes" <james.a.macinnes@gmail.com>
Subject: [PATCH] power:sbs-manager: Fix double shift of select reg
Date: Thu, 15 Feb 2018 15:13:33 -0800 [thread overview]
Message-ID: <1518736413-4797-1-git-send-email-james.a.macinnes@gmail.com> (raw)
1 << BIT() causes double shift when the macro is unwrapped
removed extra "1 <<"
---
drivers/power/supply/sbs-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/power/supply/sbs-manager.c b/drivers/power/supply/sbs-manager.c
index ccb4217..cb6e8f6 100644
--- a/drivers/power/supply/sbs-manager.c
+++ b/drivers/power/supply/sbs-manager.c
@@ -183,7 +183,7 @@ static int sbsm_select(struct i2c_mux_core *muxc, u32 chan)
return ret;
/* chan goes from 1 ... 4 */
- reg = 1 << BIT(SBSM_SMB_BAT_OFFSET + chan);
+ reg = BIT(SBSM_SMB_BAT_OFFSET + chan);
ret = sbsm_write_word(data->client, SBSM_CMD_BATSYSSTATE, reg);
if (ret)
dev_err(dev, "Failed to select channel %i\n", chan);
--
2.7.4
next reply other threads:[~2018-02-15 23:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 23:13 James A. MacInnes [this message]
2018-02-16 14:23 ` [PATCH] power:sbs-manager: Fix double shift of select reg Sebastian Reichel
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=1518736413-4797-1-git-send-email-james.a.macinnes@gmail.com \
--to=james.a.macinnes@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
/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