Commit 80104bb0 authored by Linus Torvalds's avatar Linus Torvalds

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()
parents 78ee8b1b 476c7e1d
...@@ -385,8 +385,9 @@ static void i3c_bus_set_addr_slot_status(struct i3c_bus *bus, u16 addr, ...@@ -385,8 +385,9 @@ static void i3c_bus_set_addr_slot_status(struct i3c_bus *bus, u16 addr,
return; return;
ptr = bus->addrslots + (bitpos / BITS_PER_LONG); ptr = bus->addrslots + (bitpos / BITS_PER_LONG);
*ptr &= ~(I3C_ADDR_SLOT_STATUS_MASK << (bitpos % BITS_PER_LONG)); *ptr &= ~((unsigned long)I3C_ADDR_SLOT_STATUS_MASK <<
*ptr |= status << (bitpos % BITS_PER_LONG); (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) static bool i3c_bus_dev_addr_is_avail(struct i3c_bus *bus, u8 addr)
......
...@@ -840,11 +840,6 @@ static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev, ...@@ -840,11 +840,6 @@ static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev,
if (i3c_nxfers > master->caps.cmdfifodepth) if (i3c_nxfers > master->caps.cmdfifodepth)
return -ENOTSUPP; return -ENOTSUPP;
for (i = 0; i < i3c_nxfers; i++) {
if (i3c_xfers[i].len > COMMAND_PORT_ARG_DATA_LEN_MAX)
return -ENOTSUPP;
}
for (i = 0; i < i3c_nxfers; i++) { for (i = 0; i < i3c_nxfers; i++) {
if (i3c_xfers[i].rnw) if (i3c_xfers[i].rnw)
nrxwords += DIV_ROUND_UP(i3c_xfers[i].len, 4); nrxwords += DIV_ROUND_UP(i3c_xfers[i].len, 4);
...@@ -973,11 +968,6 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev, ...@@ -973,11 +968,6 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev,
if (i2c_nxfers > master->caps.cmdfifodepth) if (i2c_nxfers > master->caps.cmdfifodepth)
return -ENOTSUPP; return -ENOTSUPP;
for (i = 0; i < i2c_nxfers; i++) {
if (i2c_xfers[i].len > COMMAND_PORT_ARG_DATA_LEN_MAX)
return -ENOTSUPP;
}
for (i = 0; i < i2c_nxfers; i++) { for (i = 0; i < i2c_nxfers; i++) {
if (i2c_xfers[i].flags & I2C_M_RD) if (i2c_xfers[i].flags & I2C_M_RD)
nrxwords += DIV_ROUND_UP(i2c_xfers[i].len, 4); nrxwords += DIV_ROUND_UP(i2c_xfers[i].len, 4);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment