[mnyman-xhci:for-usb-next 2/4] drivers/usb/host/xhci-ring.c:1236:6: sparse: sparse: symbol 'xhci_handle_stop_endpoint_command_timeout' was not declared. Should it be static?

From: kernel test robot
Date: Mon Nov 22 2021 - 15:36:19 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git for-usb-next
head: a90f619386a961d42cde656b13e4c22c133cc775
commit: a62595355b40c10d1fcc7056ddcf4c246fc72967 [2/4] xhci: use generic command timer for stop endpoint commands.
config: i386-randconfig-s001-20211122 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/commit/?id=a62595355b40c10d1fcc7056ddcf4c246fc72967
git remote add mnyman-xhci https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git
git fetch --no-tags mnyman-xhci for-usb-next
git checkout a62595355b40c10d1fcc7056ddcf4c246fc72967
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash drivers/usb/host/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)
drivers/usb/host/xhci-ring.c:625:54: sparse: sparse: restricted __le32 degrades to integer
>> drivers/usb/host/xhci-ring.c:1236:6: sparse: sparse: symbol 'xhci_handle_stop_endpoint_command_timeout' was not declared. Should it be static?

vim +/xhci_handle_stop_endpoint_command_timeout +1236 drivers/usb/host/xhci-ring.c

1235
> 1236 void xhci_handle_stop_endpoint_command_timeout(struct xhci_hcd *xhci, struct xhci_command *cmd)
1237 {
1238 struct xhci_virt_ep *ep;
1239 u32 usbsts;
1240 u32 field3;
1241 char str[XHCI_MSG_MAX];
1242
1243 field3 = le32_to_cpu(cmd->command_trb->generic.field[3]);
1244 usbsts = readl(&xhci->op_regs->status);
1245
1246 xhci_warn(xhci, "xHCI host not responding to stop endpoint command.\n");
1247 xhci_warn(xhci, "USBSTS:%s\n", xhci_decode_usbsts(str, usbsts));
1248
1249 ep = xhci_get_virt_ep(xhci,
1250 TRB_TO_SLOT_ID(field3),
1251 TRB_TO_EP_INDEX(field3));
1252 if (ep)
1253 ep->ep_state &= ~EP_STOP_CMD_PENDING;
1254
1255 xhci_halt(xhci);
1256 xhci_hc_died(xhci);
1257
1258 xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb, "xHCI host controller is dead.");
1259 }
1260

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip