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) diff --git a/drivers/i3c/master/dw-i3c-master.c b/drivers/i3c/master/dw-i3c-master.c index 10c26ffaa8ef..1d83c97431c7 100644 --- a/drivers/i3c/master/dw-i3c-master.c +++ b/drivers/i3c/master/dw-i3c-master.c @@ -840,11 +840,6 @@ static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev, if (i3c_nxfers > master->caps.cmdfifodepth) 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++) { if (i3c_xfers[i].rnw) 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, if (i2c_nxfers > master->caps.cmdfifodepth) 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++) { if (i2c_xfers[i].flags & I2C_M_RD) nrxwords += DIV_ROUND_UP(i2c_xfers[i].len, 4);