i3c: fix undefined behaviour of a shift of an int by more than 31 places
Currently the shift of two enum ints by more than 31 places on can result in undefined behaviour with 64 bit longs. Fix this by casting the ints to unsigned long before the shift. Addresses-Coverity: ("Bad shift operation"). Fixes: 3a379bbcea0a ("i3c: Add core I3C infrastructure"). Change-Id: I483f5ba295e01177c0cab0cd14a12dd6becf08f2 Signed-off-by:Colin Ian King <colin.king@canonical.com> Git-commit: 476c7e1d34f2a03b1aa5a924c50703053fe5f77c Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by:
Alok Chauhan <alokc@codeaurora.org>
Loading
Please register or sign in to comment