Re: [balbi-usb:testing/next 17/22] drivers/usb/dwc3/drd.c:604: undefined reference to `usb_role_switch_unregister'

2018-11-15 Thread Felipe Balbi


Hi,

Heikki Krogerus  writes:

> On Thu, Nov 15, 2018 at 09:46:26AM +0200, Felipe Balbi wrote:
>> 
>> Hi Heikki,
>> 
>> kbuild test robot  writes:
>> 
>> > 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'
>> 
>> care to fix this?
>
> Have you picked the RFC patch that registers the drd switch in
> drivers/usb/dwc3/drd.c? I have not even tried to compile that code :-)
>
> I really did not want that patch to be picked by you. I was just
> presenting the idea to Chen Yu. It was probable wrong of me to send it
> as a patch, even though I did use the magic "RFC" letters. Sorry for
> that.

don't worry, I missed the RFC :-p

> Is it possible for you to drop the patch, or do you prefer that we
> just fix it? I don't think reverting the patch is a good idea. If
> dropping the patch at this stage is not possible anymore, then I think
> it's probable better to just fix the situation.

Yeah, I'll drop it, no worries.

-- 
balbi


Re: [balbi-usb:testing/next 17/22] drivers/usb/dwc3/drd.c:604: undefined reference to `usb_role_switch_unregister'

2018-11-15 Thread Heikki Krogerus
On Thu, Nov 15, 2018 at 09:46:26AM +0200, Felipe Balbi wrote:
> 
> Hi Heikki,
> 
> kbuild test robot  writes:
> 
> > 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'
> 
> care to fix this?

Have you picked the RFC patch that registers the drd switch in
drivers/usb/dwc3/drd.c? I have not even tried to compile that code :-)

I really did not want that patch to be picked by you. I was just
presenting the idea to Chen Yu. It was probable wrong of me to send it
as a patch, even though I did use the magic "RFC" letters. Sorry for
that.

Is it possible for you to drop the patch, or do you prefer that we
just fix it? I don't think reverting the patch is a good idea. If
dropping the patch at this stage is not possible anymore, then I think
it's probable better to just fix the situation.


thanks,

-- 
heikki


Re: [balbi-usb:testing/next 17/22] drivers/usb/dwc3/drd.c:604: undefined reference to `usb_role_switch_unregister'

2018-11-14 Thread Felipe Balbi


Hi Heikki,

kbuild test robot  writes:

> 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'

care to fix this?

-- 
balbi


[balbi-usb:testing/next 17/22] drivers/usb/dwc3/drd.c:604: undefined reference to `usb_role_switch_unregister'

2018-11-14 Thread kbuild test robot
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 >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, 
 > _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 >edev_nb);
   578  
   579  cancel_work_sync(>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(>lock, flags);
   593  dwc->desired_otg_role = DWC3_OTG_ROLE_IDLE;
   594  spin_unlock_irqrestore(>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 infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip