Re: [PATCH v5 1/3] usb: dwc3: Registering a role switch in the DRD code.

From: kbuild test robot
Date: Sat Nov 09 2019 - 13:01:14 EST


Hi John,

I love your patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on v5.4-rc6 next-20191108]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/John-Stultz/dwc3-prereqs-for-HiKey960-USB-support/20191110-002446
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: arm-exynos_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm

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

All errors (new ones prefixed by >>):

drivers/usb/dwc3/drd.c: In function 'dwc3_drd_init':
>> drivers/usb/dwc3/drd.c:556:36: error: expected expression before ';' token
ret = dwc3_setup_role_switch(dwc);
^

vim +556 drivers/usb/dwc3/drd.c

545
546 int dwc3_drd_init(struct dwc3 *dwc)
547 {
548 int ret, irq;
549
550 dwc->edev = dwc3_get_extcon(dwc);
551 if (IS_ERR(dwc->edev))
552 return PTR_ERR(dwc->edev);
553
554 if (ROLE_SWITCH &&
555 device_property_read_bool(dwc->dev, "usb-role-switch")) {
> 556 ret = dwc3_setup_role_switch(dwc);
557 if (ret < 0)
558 return ret;
559 } else if (dwc->edev) {
560 dwc->edev_nb.notifier_call = dwc3_drd_notifier;
561 ret = extcon_register_notifier(dwc->edev, EXTCON_USB_HOST,
562 &dwc->edev_nb);
563 if (ret < 0) {
564 dev_err(dwc->dev, "couldn't register cable notifier\n");
565 return ret;
566 }
567
568 dwc3_drd_update(dwc);
569 } else {
570 dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_OTG);
571 dwc->current_dr_role = DWC3_GCTL_PRTCAP_OTG;
572
573 /* use OTG block to get ID event */
574 irq = dwc3_otg_get_irq(dwc);
575 if (irq < 0)
576 return irq;
577
578 dwc->otg_irq = irq;
579
580 /* disable all OTG IRQs */
581 dwc3_otg_disable_events(dwc, DWC3_OTG_ALL_EVENTS);
582 /* clear all events */
583 dwc3_otg_clear_events(dwc);
584
585 ret = request_threaded_irq(dwc->otg_irq, dwc3_otg_irq,
586 dwc3_otg_thread_irq,
587 IRQF_SHARED, "dwc3-otg", dwc);
588 if (ret) {
589 dev_err(dwc->dev, "failed to request irq #%d --> %d\n",
590 dwc->otg_irq, ret);
591 ret = -ENODEV;
592 return ret;
593 }
594
595 dwc3_otg_init(dwc);
596 dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_OTG);
597 }
598
599 return 0;
600 }
601

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation

Attachment: .config.gz
Description: application/gzip