All of lore.kernel.org
 help / color / mirror / Atom feed
* [android-goldfish:android-5.4 1/12] drivers/usb/dwc3/drd.c:534: undefined reference to `usb_role_switch_register'
@ 2020-11-23 20:53 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-11-23 20:53 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3873 bytes --]

tree:   https://android.googlesource.com/kernel/goldfish android-5.4
head:   8874c961255a4a9ee3136bb98db107754164bc48
commit: a768fd231472e3b763c30c1df5876c5b70a8a4bd [1/12] FROMGIT: usb: dwc3: Registering a role switch in the DRD code.
config: i386-randconfig-a006-20201123 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        git remote add android-goldfish https://android.googlesource.com/kernel/goldfish
        git fetch --no-tags android-goldfish android-5.4
        git checkout a768fd231472e3b763c30c1df5876c5b70a8a4bd
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: drivers/usb/dwc3/drd.o: in function `dwc3_setup_role_switch':
>> drivers/usb/dwc3/drd.c:534: undefined reference to `usb_role_switch_register'
   ld: drivers/usb/dwc3/drd.o: in function `dwc3_drd_exit':
>> drivers/usb/dwc3/drd.c:607: undefined reference to `usb_role_switch_unregister'

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

   526	
   527	static int dwc3_setup_role_switch(struct dwc3 *dwc)
   528	{
   529		struct usb_role_switch_desc dwc3_role_switch = {NULL};
   530	
   531		dwc3_role_switch.fwnode = dev_fwnode(dwc->dev);
   532		dwc3_role_switch.set = dwc3_usb_role_switch_set;
   533		dwc3_role_switch.get = dwc3_usb_role_switch_get;
 > 534		dwc->role_sw = usb_role_switch_register(dwc->dev, &dwc3_role_switch);
   535		if (IS_ERR(dwc->role_sw))
   536			return PTR_ERR(dwc->role_sw);
   537	
   538		dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_DEVICE);
   539		return 0;
   540	}
   541	#else
   542	#define ROLE_SWITCH 0
   543	#define dwc3_setup_role_switch(x) 0
   544	#endif
   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	
   602	void dwc3_drd_exit(struct dwc3 *dwc)
   603	{
   604		unsigned long flags;
   605	
   606		if (dwc->role_sw)
 > 607			usb_role_switch_unregister(dwc->role_sw);

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37485 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-23 20:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-23 20:53 [android-goldfish:android-5.4 1/12] drivers/usb/dwc3/drd.c:534: undefined reference to `usb_role_switch_register' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.