Skip to content
Commit 476c7e1d authored by Dan Carpenter's avatar Dan Carpenter Committed by Boris Brezillon
Browse files

i3c: Fix a shift wrap bug in i3c_bus_set_addr_slot_status()



The problem here is that addr can be I3C_BROADCAST_ADDR (126).  That
means we're shifting by (126 * 2) % 64 which is 60.  The
I3C_ADDR_SLOT_STATUS_MASK is an enum which is an unsigned int in GCC
so shifts greater than 31 are undefined.

Fixes: 3a379bbc ("i3c: Add core I3C infrastructure")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
parent 124dbd75
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