drivers/i3c/device.c:272:61: warning: shift count >= width of type
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 47b7b5e32bb7264b51b89186043e1ada4090b558 commit: 256a21743d911f94ce92fe28f793cd586f3860b2 [12362/13055] i3c: Add HDR API support config: i386-buildonly-randconfig-004-20251202 (https://download.01.org/0day-ci/archive/20251202/[email protected]/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251202/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All warnings (new ones prefixed by >>):
>> drivers/i3c/device.c:272:61: warning: shift count >= width of type [-Wshift-count-overflow]
272 | return i3c_dev_get_master(dev->desc)->this->info.hdr_cap | BIT(I3C_SDR);
| ^~~~~~~~~~~~ include/vdso/bits.h:7:26: note: expanded from macro 'BIT'
7 | #define BIT(nr) (UL(1) << (nr))
| ^ ~~~~
1 warning generated.
vim +272 drivers/i3c/device.c
261
262 /**
263 * i3c_device_get_supported_xfer_mode - Returns the supported transfer mode by
264 * connected master controller.
265 * @dev: I3C device
266 *
267 * Return: a bit mask, which supported transfer mode, bit position is defined at
268 * enum i3c_hdr_mode
269 */
270 u32 i3c_device_get_supported_xfer_mode(struct i3c_device *dev)
271 {
> 272 return i3c_dev_get_master(dev->desc)->this->info.hdr_cap | BIT(I3C_SDR);
273 }
274 EXPORT_SYMBOL_GPL(i3c_device_get_supported_xfer_mode);
275
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki