Hi John,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on usb/usb-testing]
[cannot apply to v5.4-rc2 next-20191011]
[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-role-switch-han...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-43-g0ccb3b4-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
> drivers/usb/dwc3/drd.c:543:65: sparse: sparse: Using plain
integer as NULL pointer
vim +543 drivers/usb/dwc3/drd.c
533
534 int dwc3_drd_init(struct dwc3 *dwc)
535 {
536 int ret, irq;
537
538 dwc->edev = dwc3_get_extcon(dwc);
539 if (IS_ERR(dwc->edev))
540 return PTR_ERR(dwc->edev);
541
542 if (device_property_read_bool(dwc->dev, "usb-role-switch")) {
543 struct usb_role_switch_desc dwc3_role_switch = {0};
544 u32 mode;
545
546 if (device_property_read_bool(dwc->dev,
547 "role-switch-default-host")) {
548 dwc->role_switch_default_mode = USB_DR_MODE_HOST;
549 mode = DWC3_GCTL_PRTCAP_HOST;
550 } else {
551 dwc->role_switch_default_mode = USB_DR_MODE_PERIPHERAL;
552 mode = DWC3_GCTL_PRTCAP_DEVICE;
553 }
554 dwc3_role_switch.fwnode = dev_fwnode(dwc->dev);
555 dwc3_role_switch.set = dwc3_usb_role_switch_set;
556 dwc3_role_switch.get = dwc3_usb_role_switch_get;
557 dwc->role_sw = usb_role_switch_register(dwc->dev,
558 &dwc3_role_switch);
559 if (IS_ERR(dwc->role_sw))
560 return PTR_ERR(dwc->role_sw);
561
562 dwc3_set_mode(dwc, mode);
563 } else if (dwc->edev) {
564 dwc->edev_nb.notifier_call = dwc3_drd_notifier;
565 ret = extcon_register_notifier(dwc->edev, EXTCON_USB_HOST,
566 &dwc->edev_nb);
567 if (ret < 0) {
568 dev_err(dwc->dev, "couldn't register cable notifier\n");
569 return ret;
570 }
571
572 dwc3_drd_update(dwc);
573 } else {
574 dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_OTG);
575 dwc->current_dr_role = DWC3_GCTL_PRTCAP_OTG;
576
577 /* use OTG block to get ID event */
578 irq = dwc3_otg_get_irq(dwc);
579 if (irq < 0)
580 return irq;
581
582 dwc->otg_irq = irq;
583
584 /* disable all OTG IRQs */
585 dwc3_otg_disable_events(dwc, DWC3_OTG_ALL_EVENTS);
586 /* clear all events */
587 dwc3_otg_clear_events(dwc);
588
589 ret = request_threaded_irq(dwc->otg_irq, dwc3_otg_irq,
590 dwc3_otg_thread_irq,
591 IRQF_SHARED, "dwc3-otg", dwc);
592 if (ret) {
593 dev_err(dwc->dev, "failed to request irq #%d --> %d\n",
594 dwc->otg_irq, ret);
595 ret = -ENODEV;
596 return ret;
597 }
598
599 dwc3_otg_init(dwc);
600 dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_OTG);
601 }
602
603 return 0;
604 }
605
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation