Re: [PATCH V3] usb: xhci: Add debugfs support for xHCI port bandwidth
From: kernel test robot
Date: Wed Mar 05 2025 - 23:14:49 EST
Hi raoxu,
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 v6.14-rc5 next-20250305]
[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/raoxu/usb-xhci-Add-debugfs-support-for-xHCI-port-bandwidth/20250305-165606
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/20250305085118.28826-1-raoxu%40uniontech.com
patch subject: [PATCH V3] usb: xhci: Add debugfs support for xHCI port bandwidth
config: arc-randconfig-002-20250306 (https://download.01.org/0day-ci/archive/20250306/202503061205.wtVpmjvj-lkp@xxxxxxxxx/config)
compiler: arceb-elf-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250306/202503061205.wtVpmjvj-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503061205.wtVpmjvj-lkp@xxxxxxxxx/
All warnings (new ones prefixed by >>):
drivers/usb/host/xhci.c: In function 'xhci_get_port_bandwidth':
>> drivers/usb/host/xhci.c:3094:41: warning: variable 'num_ports' set but not used [-Wunused-but-set-variable]
3094 | unsigned int num_ports;
| ^~~~~~~~~
vim +/num_ports +3094 drivers/usb/host/xhci.c
3090
3091 /* Get the available bandwidth of the ports under the xhci roothub */
3092 int xhci_get_port_bandwidth(struct xhci_hcd *xhci, u8 dev_speed)
3093 {
> 3094 unsigned int num_ports;
3095 int ret;
3096 unsigned long flags;
3097 struct xhci_container_ctx *ctx;
3098
3099 num_ports = HCS_MAX_PORTS(xhci->hcs_params1);
3100 ctx = xhci->get_bw_command->in_ctx;
3101
3102 /* get xhci hub port bandwidth */
3103 /* refer to xhci rev1_2 protocol 4.6.15*/
3104 spin_lock_irqsave(&xhci->lock, flags);
3105 ret = xhci_queue_get_rh_port_bw(xhci, xhci->get_bw_command, ctx->dma,
3106 dev_speed, 0, false);
3107 if (ret < 0) {
3108 spin_unlock_irqrestore(&xhci->lock, flags);
3109 return ret;
3110 }
3111 xhci_ring_cmd_db(xhci);
3112 spin_unlock_irqrestore(&xhci->lock, flags);
3113
3114 wait_for_completion(xhci->get_bw_command->completion);
3115
3116 return ret;
3117 }
3118
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki