From: kernel test robot <lkp@intel.com>
To: Niklas Neronin <niklas.neronin@linux.intel.com>,
mathias.nyman@linux.intel.com
Cc: oe-kbuild-all@lists.linux.dev, linux-usb@vger.kernel.org,
Niklas Neronin <niklas.neronin@linux.intel.com>
Subject: Re: [PATCH 12/13] usb: xhci: standardize multi bit-field macros
Date: Tue, 11 Nov 2025 14:10:43 +0800 [thread overview]
Message-ID: <202511111300.UAbLCfdg-lkp@intel.com> (raw)
In-Reply-To: <20251110151450.635410-13-niklas.neronin@linux.intel.com>
Hi Niklas,
kernel test robot noticed the following build errors:
[auto build test ERROR on usb/usb-testing]
[also build test ERROR on usb/usb-next usb/usb-linus tegra/for-next westeri-thunderbolt/next linus/master v6.18-rc5 next-20251110]
[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/Niklas-Neronin/usb-xhci-remove-deprecated-TODO-comment/20251110-233045
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20251110151450.635410-13-niklas.neronin%40linux.intel.com
patch subject: [PATCH 12/13] usb: xhci: standardize multi bit-field macros
config: loongarch-randconfig-002-20251111 (https://download.01.org/0day-ci/archive/20251111/202511111300.UAbLCfdg-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251111/202511111300.UAbLCfdg-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/202511111300.UAbLCfdg-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from include/linux/ratelimit_types.h:5,
from include/linux/printk.h:9,
from include/asm-generic/bug.h:22,
from arch/loongarch/include/asm/bug.h:61,
from include/linux/bug.h:5,
from include/linux/thread_info.h:13,
from include/asm-generic/preempt.h:5,
from ./arch/loongarch/include/generated/asm/preempt.h:1,
from include/linux/preempt.h:79,
from include/linux/spinlock.h:56,
from include/linux/irq.h:14,
from drivers/usb/dwc3/host.c:10:
drivers/usb/dwc3/host.c: In function 'dwc3_power_off_all_roothub_ports':
>> include/linux/bits.h:47:9: error: called object is not a function or function pointer
47 | ((t)(GENMASK_INPUT_CHECK(h, l) + \
| ^
include/linux/bits.h:51:33: note: in expansion of macro 'GENMASK_TYPE'
51 | #define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
| ^~~~~~~~~~~~
drivers/usb/dwc3/../host/xhci-caps.h:12:33: note: in expansion of macro 'GENMASK'
12 | #define HC_LENGTH GENMASK(7, 0)
| ^~~~~~~
drivers/usb/dwc3/host.c:49:32: note: in expansion of macro 'HC_LENGTH'
49 | op_regs_base = HC_LENGTH(readl(xhci_regs));
| ^~~~~~~~~
>> include/linux/bits.h:47:9: error: called object is not a function or function pointer
47 | ((t)(GENMASK_INPUT_CHECK(h, l) + \
| ^
include/linux/bits.h:51:33: note: in expansion of macro 'GENMASK_TYPE'
51 | #define GENMASK(h, l) GENMASK_TYPE(unsigned long, h, l)
| ^~~~~~~~~~~~
drivers/usb/dwc3/../host/xhci-caps.h:24:33: note: in expansion of macro 'GENMASK'
24 | #define HCS_MAX_PORTS GENMASK(31, 24)
| ^~~~~~~
drivers/usb/dwc3/host.c:51:28: note: in expansion of macro 'HCS_MAX_PORTS'
51 | port_num = HCS_MAX_PORTS(reg);
| ^~~~~~~~~~~~~
vim +47 include/linux/bits.h
31299a5e021124 Vincent Mailhol 2025-03-26 35
19408200c09485 Vincent Mailhol 2025-03-26 36 /*
19408200c09485 Vincent Mailhol 2025-03-26 37 * Generate a mask for the specified type @t. Additional checks are made to
19408200c09485 Vincent Mailhol 2025-03-26 38 * guarantee the value returned fits in that type, relying on
19408200c09485 Vincent Mailhol 2025-03-26 39 * -Wshift-count-overflow compiler check to detect incompatible arguments.
19408200c09485 Vincent Mailhol 2025-03-26 40 * For example, all these create build errors or warnings:
19408200c09485 Vincent Mailhol 2025-03-26 41 *
19408200c09485 Vincent Mailhol 2025-03-26 42 * - GENMASK(15, 20): wrong argument order
19408200c09485 Vincent Mailhol 2025-03-26 43 * - GENMASK(72, 15): doesn't fit unsigned long
19408200c09485 Vincent Mailhol 2025-03-26 44 * - GENMASK_U32(33, 15): doesn't fit in a u32
19408200c09485 Vincent Mailhol 2025-03-26 45 */
19408200c09485 Vincent Mailhol 2025-03-26 46 #define GENMASK_TYPE(t, h, l) \
19408200c09485 Vincent Mailhol 2025-03-26 @47 ((t)(GENMASK_INPUT_CHECK(h, l) + \
19408200c09485 Vincent Mailhol 2025-03-26 48 (type_max(t) << (l) & \
19408200c09485 Vincent Mailhol 2025-03-26 49 type_max(t) >> (BITS_PER_TYPE(t) - 1 - (h)))))
19408200c09485 Vincent Mailhol 2025-03-26 50
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-11 6:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-10 15:14 [PATCH 00/13] usb: xhci: Host Controller Capability Registers rework Niklas Neronin
2025-11-10 15:14 ` [PATCH 01/13] usb: xhci: remove deprecated TODO comment Niklas Neronin
2025-11-10 15:14 ` [PATCH 02/13] usb: xhci: remove unused trace operation and argument Niklas Neronin
2025-11-10 15:14 ` [PATCH 03/13] usb: xhci: use cached HCSPARAMS1 value Niklas Neronin
2025-11-10 15:14 ` [PATCH 04/13] usb: xhci: simplify handling of Structural Parameters 1 values Niklas Neronin
2025-11-10 15:14 ` [PATCH 05/13] usb: xhci: limit number of ports to 127 Niklas Neronin
2025-11-10 15:14 ` [PATCH 06/13] usb: xhci: limit number of interrupts to 128 Niklas Neronin
2025-11-10 15:14 ` [PATCH 07/13] usb: xhci: improve xhci-caps.h comments Niklas Neronin
2025-11-10 15:14 ` [PATCH 08/13] usb: xhci: simplify Isochronous Scheduling Threshold handling Niklas Neronin
2025-11-12 16:11 ` Michal Pecio
2025-11-10 15:14 ` [PATCH 09/13] usb: xhci: simplify Max Scratchpad buffer macros Niklas Neronin
2025-11-10 15:14 ` [PATCH 10/13] usb: xhci: drop xhci-caps.h dependence on xhci-ext-caps.h Niklas Neronin
2025-11-10 15:14 ` [PATCH 11/13] usb: xhci: standardize single bit-field macros Niklas Neronin
2025-11-11 8:51 ` Sakari Ailus
2025-11-13 10:34 ` Mathias Nyman
2025-11-10 15:14 ` [PATCH 12/13] usb: xhci: standardize multi " Niklas Neronin
2025-11-11 6:10 ` kernel test robot [this message]
2025-11-11 10:00 ` kernel test robot
2025-11-10 15:14 ` [PATCH 13/13] usb: xhci: use 64-bit Addressing Capability macro Niklas Neronin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202511111300.UAbLCfdg-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=niklas.neronin@linux.intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).