Re: [PATCH] usb: cdnsp: Fix issue with CV Bad Descriptor test

From: kernel test robot
Date: Tue Jun 17 2025 - 19:59:44 EST


Hi Pawel,

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.16-rc2 next-20250617]
[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/Pawel-Laszczak/usb-cdnsp-Fix-issue-with-CV-Bad-Descriptor-test/20250617-155848
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
patch link: https://lore.kernel.org/r/PH7PR07MB95388A30AE3E50D42E0592CADD73A%40PH7PR07MB9538.namprd07.prod.outlook.com
patch subject: [PATCH] usb: cdnsp: Fix issue with CV Bad Descriptor test
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20250618/202506180958.aX9DgCOG-lkp@xxxxxxxxx/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250618/202506180958.aX9DgCOG-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/202506180958.aX9DgCOG-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/usb/cdns3/cdnsp-ep0.c:432:6: warning: variable 'pep' is uninitialized when used here [-Wuninitialized]
432 | if (pep->ep_state & EP_HALTED) {
| ^~~
drivers/usb/cdns3/cdnsp-ep0.c:417:22: note: initialize the variable 'pep' to silence this warning
417 | struct cdnsp_ep *pep;
| ^
| = NULL
1 warning generated.


vim +/pep +432 drivers/usb/cdns3/cdnsp-ep0.c

413
414 void cdnsp_setup_analyze(struct cdnsp_device *pdev)
415 {
416 struct usb_ctrlrequest *ctrl = &pdev->setup;
417 struct cdnsp_ep *pep;
418 int ret = -EINVAL;
419 u16 len;
420
421 trace_cdnsp_ctrl_req(ctrl);
422
423 if (!pdev->gadget_driver)
424 goto out;
425
426 if (pdev->gadget.state == USB_STATE_NOTATTACHED) {
427 dev_err(pdev->dev, "ERR: Setup detected in unattached state\n");
428 goto out;
429 }
430
431 /* Restore the ep0 to Stopped/Running state. */
> 432 if (pep->ep_state & EP_HALTED) {

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