* [PATCH] power:sbs-manager: Fix double shift of select reg
@ 2018-02-15 23:13 James A. MacInnes
2018-02-16 14:23 ` Sebastian Reichel
0 siblings, 1 reply; 2+ messages in thread
From: James A. MacInnes @ 2018-02-15 23:13 UTC (permalink / raw)
To: sre, linux-pm, linux-kernel; +Cc: James A. MacInnes
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] power:sbs-manager: Fix double shift of select reg
2018-02-15 23:13 [PATCH] power:sbs-manager: Fix double shift of select reg James A. MacInnes
@ 2018-02-16 14:23 ` Sebastian Reichel
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Reichel @ 2018-02-16 14:23 UTC (permalink / raw)
To: James A. MacInnes; +Cc: linux-pm, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]
Hi James,
On Thu, Feb 15, 2018 at 03:13:33PM -0800, James A. MacInnes wrote:
> 1 << BIT() causes double shift when the macro is unwrapped
> removed extra "1 <<"
No Signed-off-by... But this is already fixed:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7d54d0d38ec42559c891526f079f1e035cd4b3ae
-- Sebastian
> ---
> 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
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-16 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-15 23:13 [PATCH] power:sbs-manager: Fix double shift of select reg James A. MacInnes
2018-02-16 14:23 ` Sebastian Reichel
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).