Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80104bb0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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)
+0 −10
Original line number Diff line number Diff line
@@ -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);