diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-07 17:50:40 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-07 17:50:40 +0200 |
commit | 80104bb06b17497b570b11a187131dca7d445b40 (patch) | |
tree | 6fb56513c6a32e3ac7cfc7f8d2babea3c33e7793 /drivers/i3c/master.c | |
parent | Merge branch 'next-general' of git://git.kernel.org/pub/scm/linux/kernel/git/... (diff) | |
parent | i3c: Fix a shift wrap bug in i3c_bus_set_addr_slot_status() (diff) | |
download | linux-80104bb06b17497b570b11a187131dca7d445b40.tar.xz linux-80104bb06b17497b570b11a187131dca7d445b40.zip |
Merge tag 'i3c/for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux
Pull i3c update from Boris Brezillon:
- Fix a shift wrap bug in the core
- Remove dead code in the DW driver
* tag 'i3c/for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/i3c/linux:
i3c: Fix a shift wrap bug in i3c_bus_set_addr_slot_status()
i3c: master: dw: remove dead code from dw_i3c_master_*_xfers()
Diffstat (limited to 'drivers/i3c/master.c')
-rw-r--r-- | drivers/i3c/master.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c index 1412abcff010..5f4bd52121fe 100644 --- a/drivers/i3c/master.c +++ b/drivers/i3c/master.c @@ -385,8 +385,9 @@ static void i3c_bus_set_addr_slot_status(struct i3c_bus *bus, u16 addr, return; ptr = bus->addrslots + (bitpos / BITS_PER_LONG); - *ptr &= ~(I3C_ADDR_SLOT_STATUS_MASK << (bitpos % BITS_PER_LONG)); - *ptr |= status << (bitpos % BITS_PER_LONG); + *ptr &= ~((unsigned long)I3C_ADDR_SLOT_STATUS_MASK << + (bitpos % BITS_PER_LONG)); + *ptr |= (unsigned long)status << (bitpos % BITS_PER_LONG); } static bool i3c_bus_dev_addr_is_avail(struct i3c_bus *bus, u8 addr) |