Re: [PATCH] usb: xhci: use BIT macro

kernel test robot
2026-03-14T14:34:24Z

[also build test WARNING on usb/usb-next usb/usb-linus next-20260313]
[cannot apply to linus/master v6.16-rc1]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Oliver-Neukum/usb-xhci-use-BIT-macro/20260314-143843
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20260312150649.2138749-1-oneukum%40suse.com
patch subject: [PATCH] usb: xhci: use BIT macro
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260314/202603141518.Qeu41mKO-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260314/202603141518.Qeu41mKO-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603141518.Qeu41mKO-lkp@intel.com/

All warnings (new ones prefixed by >>):

In file included from drivers/usb/host/xhci.c:25:
drivers/usb/host/xhci.h: In function 'xhci_decode_slot_context':
>> drivers/usb/host/xhci.h:2321:57: warning: format '%d' expects argument of type 'int', but argument 7 has type 'long unsigned int' [-Wformat=]
2321 | ret = sprintf(str, "RS %05x %s%s%s Ctx Entries %d MEL %d us Port# %d/%d",
| ~^
| |
| int
| %ld
......
2345 | (info & LAST_CTX_MASK) >> 27,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| long unsigned int

vim +2321 drivers/usb/host/xhci.h

90d6d5731da79a Mathias Nyman 2019-04-26 2308
4843b4b5ec64b8 Mathias Nyman 2021-08-20 2309 static inline const char *xhci_decode_slot_context(char *str,
4843b4b5ec64b8 Mathias Nyman 2021-08-20 2310 u32 info, u32 info2, u32 tt_info, u32 state)
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2311 {
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2312 u32 speed;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2313 u32 hub;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2314 u32 mtt;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2315 int ret = 0;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2316
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2317 speed = info & DEV_SPEED;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2318 hub = info & DEV_HUB;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2319 mtt = info & DEV_MTT;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2320
19a7d0d65c4a81 Felipe Balbi 2017-04-07 @2321 ret = sprintf(str, "RS %05x %s%s%s Ctx Entries %d MEL %d us Port# %d/%d",
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2322 info & ROUTE_STRING_MASK,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2323 ({ char *s;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2324 switch (speed) {
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2325 case SLOT_SPEED_FS:
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2326 s = "full-speed";
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2327 break;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2328 case SLOT_SPEED_LS:
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2329 s = "low-speed";
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2330 break;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2331 case SLOT_SPEED_HS:
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2332 s = "high-speed";
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2333 break;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2334 case SLOT_SPEED_SS:
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2335 s = "super-speed";
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2336 break;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2337 case SLOT_SPEED_SSP:
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2338 s = "super-speed plus";
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2339 break;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2340 default:
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2341 s = "UNKNOWN speed";
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2342 } s; }),
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2343 mtt ? " multi-TT" : "",
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2344 hub ? " Hub" : "",
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2345 (info & LAST_CTX_MASK) >> 27,