* Patch "power: supply: sbs-message: double left shift bug in sbsm_select()" has been added to the 4.15-stable tree
@ 2018-03-16 14:16 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-03-16 14:16 UTC (permalink / raw)
To: dan.carpenter, alexander.levin, gregkh, sebastian.reichel
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
power: supply: sbs-message: double left shift bug in sbsm_select()
to the 4.15-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
power-supply-sbs-message-double-left-shift-bug-in-sbsm_select.patch
and it can be found in the queue-4.15 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Fri Mar 16 15:11:07 CET 2018
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 7 Nov 2017 15:43:22 +0300
Subject: power: supply: sbs-message: double left shift bug in sbsm_select()
From: Dan Carpenter <dan.carpenter@oracle.com>
[ Upstream commit 7d54d0d38ec42559c891526f079f1e035cd4b3ae ]
The original code does this: "1 << (1 << 11)" which is undefined in C.
Fixes: dbc4deda03fe ("power: Adds support for Smart Battery System Manager")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/power/supply/sbs-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- 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_co
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);
Patches currently in stable-queue which might be from dan.carpenter@oracle.com are
queue-4.15/media-cpia2-fix-a-couple-off-by-one-bugs.patch
queue-4.15/crypto-chelsio-fix-an-error-code-in-chcr_hash_dma_map.patch
queue-4.15/drm-panel-rpi-touchscreen-propagate-errors-in-rpi_touchscreen_i2c_read.patch
queue-4.15/bnxt_en-uninitialized-variable-in-bnxt_tc_parse_actions.patch
queue-4.15/power-supply-sbs-message-double-left-shift-bug-in-sbsm_select.patch
queue-4.15/asoc-nuc900-fix-a-loop-timeout-test.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-03-16 14:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-16 14:16 Patch "power: supply: sbs-message: double left shift bug in sbsm_select()" has been added to the 4.15-stable tree gregkh
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).