Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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()

+3 -12
+3 -2
drivers/i3c/master.c
··· 385 385 return; 386 386 387 387 ptr = bus->addrslots + (bitpos / BITS_PER_LONG); 388 - *ptr &= ~(I3C_ADDR_SLOT_STATUS_MASK << (bitpos % BITS_PER_LONG)); 389 - *ptr |= status << (bitpos % BITS_PER_LONG); 388 + *ptr &= ~((unsigned long)I3C_ADDR_SLOT_STATUS_MASK << 389 + (bitpos % BITS_PER_LONG)); 390 + *ptr |= (unsigned long)status << (bitpos % BITS_PER_LONG); 390 391 } 391 392 392 393 static bool i3c_bus_dev_addr_is_avail(struct i3c_bus *bus, u8 addr)
-10
drivers/i3c/master/dw-i3c-master.c
··· 841 841 return -ENOTSUPP; 842 842 843 843 for (i = 0; i < i3c_nxfers; i++) { 844 - if (i3c_xfers[i].len > COMMAND_PORT_ARG_DATA_LEN_MAX) 845 - return -ENOTSUPP; 846 - } 847 - 848 - for (i = 0; i < i3c_nxfers; i++) { 849 844 if (i3c_xfers[i].rnw) 850 845 nrxwords += DIV_ROUND_UP(i3c_xfers[i].len, 4); 851 846 else ··· 967 972 968 973 if (i2c_nxfers > master->caps.cmdfifodepth) 969 974 return -ENOTSUPP; 970 - 971 - for (i = 0; i < i2c_nxfers; i++) { 972 - if (i2c_xfers[i].len > COMMAND_PORT_ARG_DATA_LEN_MAX) 973 - return -ENOTSUPP; 974 - } 975 975 976 976 for (i = 0; i < i2c_nxfers; i++) { 977 977 if (i2c_xfers[i].flags & I2C_M_RD)