* Re: [PATCH] usb: xhci: use BIT macro
2026-03-12 15:06 [PATCH] usb: xhci: use BIT macro Oliver Neukum
@ 2026-03-14 2:36 ` lihuisong (C)
2026-03-14 14:22 ` kernel test robot
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: lihuisong (C) @ 2026-03-14 2:36 UTC (permalink / raw)
To: Oliver Neukum, mathias.nyman, gregkh, linux-usb
Change below comment, then can add
Acked-by: lihuisong@huawei.com
On 3/12/2026 11:06 PM, Oliver Neukum wrote:
> We have the macro. Use it.
>
> Signed-off-by: Oliver Neukum <oneukum@suse.com>
> ---
> drivers/usb/host/xhci.h | 123 ++++++++++++++++++++--------------------
> 1 file changed, 62 insertions(+), 61 deletions(-)
<...>
> /* imod bitmasks */
> /*
> @@ -267,7 +268,7 @@ struct xhci_intr_reg {
> * bit 3 - Event Handler Busy (EHB), whether the event ring is scheduled to be serviced by
> * a work queue (or delayed service routine)?
> */
> -#define ERST_EHB (1 << 3)
> +#define ERST_EHB BIT(3)
> /* bits 63:4 - Event Ring Dequeue Pointer */
> #define ERST_PTR_MASK GENMASK_ULL(63, 4)
>
> @@ -356,15 +357,15 @@ struct xhci_slot_ctx {
> #define GET_DEV_SPEED(n) (((n) & DEV_SPEED) >> 20)
> /* bit 24 reserved */
> /* Is this LS/FS device connected through a HS hub? - bit 25 */
> -#define DEV_MTT (0x1 << 25)
> +#define DEV_MTT BIT(25)
> /* Set if the device is a hub - bit 26 */
> -#define DEV_HUB (0x1 << 26)
> +#define DEV_HUB BIT(26)
> /* Index of the last valid endpoint context in this device context - 27:31 */
> -#define LAST_CTX_MASK (0x1f << 27)
> +#define LAST_CTX_MASK BIT(27)
here is wrong.
> #define LAST_CTX(p) ((p) << 27)
> #define LAST_CTX_TO_EP_NUM(p) (((p) >> 27) - 1)
> -#define SLOT_FLAG (1 << 0)
> -#define EP0_FLAG (1 << 1)
> +#define SLOT_FLAG BIT(0)
> +#define EP0_FLAG BIT(1)
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] usb: xhci: use BIT macro
2026-03-12 15:06 [PATCH] usb: xhci: use BIT macro Oliver Neukum
2026-03-14 2:36 ` lihuisong (C)
@ 2026-03-14 14:22 ` kernel test robot
2026-03-14 14:33 ` kernel test robot
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-03-14 14:22 UTC (permalink / raw)
To: Oliver Neukum, mathias.nyman, gregkh, linux-usb
Cc: llvm, oe-kbuild-all, Oliver Neukum
Hi Oliver,
kernel test robot noticed the following build warnings:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus linus/master v7.0-rc3 next-20260313]
[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-kexec (https://download.01.org/0day-ci/archive/20260314/202603141541.J7d7NSVo-lkp@intel.com/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/20260314/202603141541.J7d7NSVo-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/202603141541.J7d7NSVo-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/usb/host/xhci.c:25:
>> drivers/usb/host/xhci.h:2345:4: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
2321 | (info & LAST_CTX_MASK) >> 27,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
--
In file included from drivers/usb/early/xhci-dbc.c:26:
>> drivers/usb/early/../host/xhci.h:2345:4: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
2321 | (info & LAST_CTX_MASK) >> 27,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +2345 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,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2346 info2 & MAX_EXIT,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2347 DEVINFO_TO_ROOT_HUB_PORT(info2),
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2348 DEVINFO_TO_MAX_PORTS(info2));
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2349
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2350 ret += sprintf(str + ret, " [TT Slot %d Port# %d TTT %d Intr %d] Addr %d State %s",
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2351 tt_info & TT_SLOT, (tt_info & TT_PORT) >> 8,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2352 GET_TT_THINK_TIME(tt_info), GET_INTR_TARGET(tt_info),
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2353 state & DEV_ADDR_MASK,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2354 xhci_slot_state_string(GET_SLOT_STATE(state)));
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2355
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2356 return str;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2357 }
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2358
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] usb: xhci: use BIT macro
2026-03-12 15:06 [PATCH] usb: xhci: use BIT macro Oliver Neukum
2026-03-14 2:36 ` lihuisong (C)
2026-03-14 14:22 ` kernel test robot
@ 2026-03-14 14:33 ` kernel test robot
2026-03-31 14:22 ` kernel test robot
2026-03-31 22:07 ` kernel test robot
4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-03-14 14:33 UTC (permalink / raw)
To: Oliver Neukum, mathias.nyman, gregkh, linux-usb
Cc: oe-kbuild-all, Oliver Neukum
Hi Oliver,
kernel test robot noticed the following build warnings:
[auto build test WARNING on usb/usb-testing]
[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,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2346 info2 & MAX_EXIT,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2347 DEVINFO_TO_ROOT_HUB_PORT(info2),
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2348 DEVINFO_TO_MAX_PORTS(info2));
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2349
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2350 ret += sprintf(str + ret, " [TT Slot %d Port# %d TTT %d Intr %d] Addr %d State %s",
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2351 tt_info & TT_SLOT, (tt_info & TT_PORT) >> 8,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2352 GET_TT_THINK_TIME(tt_info), GET_INTR_TARGET(tt_info),
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2353 state & DEV_ADDR_MASK,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2354 xhci_slot_state_string(GET_SLOT_STATE(state)));
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2355
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2356 return str;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2357 }
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2358
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] usb: xhci: use BIT macro
2026-03-12 15:06 [PATCH] usb: xhci: use BIT macro Oliver Neukum
` (2 preceding siblings ...)
2026-03-14 14:33 ` kernel test robot
@ 2026-03-31 14:22 ` kernel test robot
2026-03-31 22:07 ` kernel test robot
4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-03-31 14:22 UTC (permalink / raw)
To: Oliver Neukum, mathias.nyman, gregkh, linux-usb
Cc: oe-kbuild-all, Oliver Neukum
Hi Oliver,
kernel test robot noticed the following build warnings:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus linus/master v7.0-rc6 next-20260330]
[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: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20260331/202603312226.4Rkqoq6u-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260331/202603312226.4Rkqoq6u-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/202603312226.4Rkqoq6u-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
--
In file included from drivers/usb/cdns3/host.c:18:
drivers/usb/cdns3/../host/xhci.h: In function 'xhci_decode_slot_context':
>> drivers/usb/cdns3/../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,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2346 info2 & MAX_EXIT,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2347 DEVINFO_TO_ROOT_HUB_PORT(info2),
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2348 DEVINFO_TO_MAX_PORTS(info2));
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2349
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2350 ret += sprintf(str + ret, " [TT Slot %d Port# %d TTT %d Intr %d] Addr %d State %s",
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2351 tt_info & TT_SLOT, (tt_info & TT_PORT) >> 8,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2352 GET_TT_THINK_TIME(tt_info), GET_INTR_TARGET(tt_info),
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2353 state & DEV_ADDR_MASK,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2354 xhci_slot_state_string(GET_SLOT_STATE(state)));
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2355
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2356 return str;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2357 }
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2358
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] usb: xhci: use BIT macro
2026-03-12 15:06 [PATCH] usb: xhci: use BIT macro Oliver Neukum
` (3 preceding siblings ...)
2026-03-31 14:22 ` kernel test robot
@ 2026-03-31 22:07 ` kernel test robot
4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-03-31 22:07 UTC (permalink / raw)
To: Oliver Neukum, mathias.nyman, gregkh, linux-usb
Cc: llvm, oe-kbuild-all, Oliver Neukum
Hi Oliver,
kernel test robot noticed the following build warnings:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on usb/usb-next usb/usb-linus linus/master v7.0-rc6 next-20260330]
[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: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260401/202604010611.oXcU3y6m-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 2cd67b8b69f78e3f95918204320c3075a74ba16c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260401/202604010611.oXcU3y6m-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/202604010611.oXcU3y6m-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/usb/host/xhci.c:25:
>> drivers/usb/host/xhci.h:2345:4: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
2321 | (info & LAST_CTX_MASK) >> 27,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
--
In file included from drivers/usb/cdns3/host.c:18:
>> drivers/usb/cdns3/../host/xhci.h:2345:4: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
2321 | (info & LAST_CTX_MASK) >> 27,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +2345 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,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2346 info2 & MAX_EXIT,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2347 DEVINFO_TO_ROOT_HUB_PORT(info2),
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2348 DEVINFO_TO_MAX_PORTS(info2));
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2349
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2350 ret += sprintf(str + ret, " [TT Slot %d Port# %d TTT %d Intr %d] Addr %d State %s",
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2351 tt_info & TT_SLOT, (tt_info & TT_PORT) >> 8,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2352 GET_TT_THINK_TIME(tt_info), GET_INTR_TARGET(tt_info),
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2353 state & DEV_ADDR_MASK,
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2354 xhci_slot_state_string(GET_SLOT_STATE(state)));
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2355
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2356 return str;
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2357 }
19a7d0d65c4a81 Felipe Balbi 2017-04-07 2358
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread