summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/i3c/master.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 2dc628d4f1ae..d539252eed79 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,
385 return; 385 return;
386 386
387 ptr = bus->addrslots + (bitpos / BITS_PER_LONG); 387 ptr = bus->addrslots + (bitpos / BITS_PER_LONG);
388 *ptr &= ~(I3C_ADDR_SLOT_STATUS_MASK << (bitpos % BITS_PER_LONG)); 388 *ptr &= ~((unsigned long)I3C_ADDR_SLOT_STATUS_MASK <<
389 *ptr |= status << (bitpos % BITS_PER_LONG); 389 (bitpos % BITS_PER_LONG));
390 *ptr |= (unsigned long)status << (bitpos % BITS_PER_LONG);
390} 391}
391 392
392static bool i3c_bus_dev_addr_is_avail(struct i3c_bus *bus, u8 addr) 393static bool i3c_bus_dev_addr_is_avail(struct i3c_bus *bus, u8 addr)