tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next head: bad6c1502dac79c80ad5a7149fa308849c0191dd commit: 24e2238d8c102f242ece57f45fbeb4014929aad4 [17/22] usb: dwc3: drd: Register a USB role switch config: x86_64-randconfig-s4-11151335 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: git checkout 24e2238d8c102f242ece57f45fbeb4014929aad4 # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/usb/dwc3/drd.o: In function `dwc3_drd_exit': >> drivers/usb/dwc3/drd.c:604: undefined reference to `usb_role_switch_unregister' drivers/usb/dwc3/drd.o: In function `dwc3_drd_init': >> drivers/usb/dwc3/drd.c:563: undefined reference to `usb_role_switch_register' >> drivers/usb/dwc3/drd.c:563: undefined reference to `usb_role_switch_register' vim +604 drivers/usb/dwc3/drd.c 514 515 int dwc3_drd_init(struct dwc3 *dwc) 516 { 517 int ret, irq; 518 519 dwc->edev = dwc3_get_extcon(dwc); 520 if (IS_ERR(dwc->edev)) 521 return PTR_ERR(dwc->edev); 522 523 if (dwc->edev) { 524 dwc->edev_nb.notifier_call = dwc3_drd_notifier; 525 ret = extcon_register_notifier(dwc->edev, EXTCON_USB_HOST, 526 &dwc->edev_nb); 527 if (ret < 0) { 528 dev_err(dwc->dev, "couldn't register cable notifier\n"); 529 return ret; 530 } 531 532 dwc3_drd_update(dwc); 533 } else { 534 dwc3_set_prtcap(dwc, DWC3_GCTL_PRTCAP_OTG); 535 dwc->current_dr_role = DWC3_GCTL_PRTCAP_OTG; 536 537 /* use OTG block to get ID event */ 538 irq = dwc3_otg_get_irq(dwc); 539 if (irq < 0) 540 return irq; 541 542 dwc->otg_irq = irq; 543 544 /* disable all OTG IRQs */ 545 dwc3_otg_disable_events(dwc, DWC3_OTG_ALL_EVENTS); 546 /* clear all events */ 547 dwc3_otg_clear_events(dwc); 548 549 ret = request_threaded_irq(dwc->otg_irq, dwc3_otg_irq, 550 dwc3_otg_thread_irq, 551 IRQF_SHARED, "dwc3-otg", dwc); 552 if (ret) { 553 dev_err(dwc->dev, "failed to request irq #%d --> %d\n", 554 dwc->otg_irq, ret); 555 ret = -ENODEV; 556 return ret; 557 } 558 559 dwc3_otg_init(dwc); 560 dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_OTG); 561 } 562 > 563 dwc->role_sw = usb_role_switch_register(dwc->dev, &dwc3_role_switch); 564 if (ret) { 565 dwc3_drd_exit(dwc); 566 return PTR_ERR(dwc->role_sw); 567 } 568 return 0; 569 } 570 571 void dwc3_drd_exit(struct dwc3 *dwc) 572 { 573 unsigned long flags; 574 575 if (dwc->edev) 576 extcon_unregister_notifier(dwc->edev, EXTCON_USB_HOST, 577 &dwc->edev_nb); 578 579 cancel_work_sync(&dwc->drd_work); 580 581 /* debug user might have changed role, clean based on current role */ 582 switch (dwc->current_dr_role) { 583 case DWC3_GCTL_PRTCAP_HOST: 584 dwc3_host_exit(dwc); 585 break; 586 case DWC3_GCTL_PRTCAP_DEVICE: 587 dwc3_gadget_exit(dwc); 588 dwc3_event_buffers_cleanup(dwc); 589 break; 590 case DWC3_GCTL_PRTCAP_OTG: 591 dwc3_otg_exit(dwc); 592 spin_lock_irqsave(&dwc->lock, flags); 593 dwc->desired_otg_role = DWC3_OTG_ROLE_IDLE; 594 spin_unlock_irqrestore(&dwc->lock, flags); 595 dwc3_otg_update(dwc, 1); 596 break; 597 default: 598 break; 599 } 600 601 if (!dwc->edev) 602 free_irq(dwc->otg_irq, dwc); 603 > 604 usb_role_switch_unregister(dwc->role_sw); --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip