Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* drivers/usb/early/xhci-dbc.c:657:22: warning: unused variable 'offset'
@ 2026-06-04 21:46 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-06-04 21:46 UTC (permalink / raw)
  To: Umang Jain; +Cc: llvm, oe-kbuild-all, 0day robot

tree:   https://github.com/intel-lab-lkp/linux/commits/Umang-Jain/usb-early-xhci-dbc-Track-early_ioremap-size-separately/20260604-225542
head:   2ecba7a3b238002d00204460340708e61b6bee82
commit: 2ecba7a3b238002d00204460340708e61b6bee82 WIP: early: xhci-xdbc: Map lower and with 0 offset to partially work
date:   7 hours ago
config: x86_64-kexec (https://download.01.org/0day-ci/archive/20260604/202606042320.kigKLoga-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project f43d6834093b19baf79beda8c0337ab020ac5f17)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260604/202606042320.kigKLoga-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/202606042320.kigKLoga-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/usb/early/xhci-dbc.c:657:22: warning: unused variable 'offset' [-Wunused-variable]
     657 |         u32 bus, dev, func, offset;
         |                             ^~~~~~
   1 warning generated.


vim +/offset +657 drivers/usb/early/xhci-dbc.c

aeb9dd1de98c1a Lu Baolu       2017-03-21  653  
b0ae33a2d2fb6c Peter Zijlstra 2022-03-04  654  int __init early_xdbc_parse_parameter(char *s, int keep_early)
aeb9dd1de98c1a Lu Baolu       2017-03-21  655  {
aeb9dd1de98c1a Lu Baolu       2017-03-21  656  	unsigned long dbgp_num = 0;
aeb9dd1de98c1a Lu Baolu       2017-03-21 @657  	u32 bus, dev, func, offset;
298ac860af9a0b Peter Zijlstra 2022-03-04  658  	char *e;
aeb9dd1de98c1a Lu Baolu       2017-03-21  659  	int ret;
aeb9dd1de98c1a Lu Baolu       2017-03-21  660  
aeb9dd1de98c1a Lu Baolu       2017-03-21  661  	if (!early_pci_allowed())
aeb9dd1de98c1a Lu Baolu       2017-03-21  662  		return -EPERM;
aeb9dd1de98c1a Lu Baolu       2017-03-21  663  
b0ae33a2d2fb6c Peter Zijlstra 2022-03-04  664  	early_console_keep = keep_early;
aeb9dd1de98c1a Lu Baolu       2017-03-21  665  
aeb9dd1de98c1a Lu Baolu       2017-03-21  666  	if (xdbc.xdbc_reg)
aeb9dd1de98c1a Lu Baolu       2017-03-21  667  		return 0;
aeb9dd1de98c1a Lu Baolu       2017-03-21  668  
298ac860af9a0b Peter Zijlstra 2022-03-04  669  	if (*s) {
298ac860af9a0b Peter Zijlstra 2022-03-04  670  	       dbgp_num = simple_strtoul(s, &e, 10);
298ac860af9a0b Peter Zijlstra 2022-03-04  671  	       if (s == e)
aeb9dd1de98c1a Lu Baolu       2017-03-21  672  		       dbgp_num = 0;
298ac860af9a0b Peter Zijlstra 2022-03-04  673  	}
aeb9dd1de98c1a Lu Baolu       2017-03-21  674  
aeb9dd1de98c1a Lu Baolu       2017-03-21  675  	pr_notice("dbgp_num: %lu\n", dbgp_num);
aeb9dd1de98c1a Lu Baolu       2017-03-21  676  
aeb9dd1de98c1a Lu Baolu       2017-03-21  677  	/* Locate the host controller: */
aeb9dd1de98c1a Lu Baolu       2017-03-21  678  	ret = xdbc_find_dbgp(dbgp_num, &bus, &dev, &func);
aeb9dd1de98c1a Lu Baolu       2017-03-21  679  	if (ret) {
aeb9dd1de98c1a Lu Baolu       2017-03-21  680  		pr_notice("failed to locate xhci host\n");
aeb9dd1de98c1a Lu Baolu       2017-03-21  681  		return -ENODEV;
aeb9dd1de98c1a Lu Baolu       2017-03-21  682  	}
aeb9dd1de98c1a Lu Baolu       2017-03-21  683  
aeb9dd1de98c1a Lu Baolu       2017-03-21  684  	xdbc.vendor	= read_pci_config_16(bus, dev, func, PCI_VENDOR_ID);
aeb9dd1de98c1a Lu Baolu       2017-03-21  685  	xdbc.device	= read_pci_config_16(bus, dev, func, PCI_DEVICE_ID);
aeb9dd1de98c1a Lu Baolu       2017-03-21  686  	xdbc.bus	= bus;
aeb9dd1de98c1a Lu Baolu       2017-03-21  687  	xdbc.dev	= dev;
aeb9dd1de98c1a Lu Baolu       2017-03-21  688  	xdbc.func	= func;
aeb9dd1de98c1a Lu Baolu       2017-03-21  689  
aeb9dd1de98c1a Lu Baolu       2017-03-21  690  	/* Map the IO memory: */
aeb9dd1de98c1a Lu Baolu       2017-03-21  691  	xdbc.xhci_base = xdbc_map_pci_mmio(bus, dev, func);
aeb9dd1de98c1a Lu Baolu       2017-03-21  692  	if (!xdbc.xhci_base)
aeb9dd1de98c1a Lu Baolu       2017-03-21  693  		return -EINVAL;
aeb9dd1de98c1a Lu Baolu       2017-03-21  694  
2ecba7a3b23800 Umang Jain     2026-06-04  695  	xdbc.xdbc_reg = (struct xdbc_regs __iomem *)(xdbc.xhci_base);
aeb9dd1de98c1a Lu Baolu       2017-03-21  696  
aeb9dd1de98c1a Lu Baolu       2017-03-21  697  	return 0;
aeb9dd1de98c1a Lu Baolu       2017-03-21  698  }
aeb9dd1de98c1a Lu Baolu       2017-03-21  699  

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-04 21:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04 21:46 drivers/usb/early/xhci-dbc.c:657:22: warning: unused variable 'offset' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox