tree: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next head: 5db5ea26a2469d8899f995e82e8b718dc9e9d168 commit: 732665ed28bd4d18b1c04d939c6abfb0a021e377 [2/17] usb: dwc2: override PHY input signals with usb role switch support config: x86_64-randconfig-r014-20200719 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 3d9967039d4191b77f939ddc6c6ff4275df620c2) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install x86_64 cross compiling tool for clang build # apt-get install binutils-x86-64-linux-gnu git checkout 732665ed28bd4d18b1c04d939c6abfb0a021e377 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): >> drivers/usb/dwc2/drd.c:80:38: error: no member named 'test_mode' in 'struct dwc2_hsotg' if (role == USB_ROLE_NONE && hsotg->test_mode) { ~~~~~ ^ >> drivers/usb/dwc2/drd.c:114:5: error: implicit declaration of function 'dwc2_hsotg_core_disconnect' [-Werror,-Wimplicit-function-declaration] dwc2_hsotg_core_disconnect(hsotg); ^ drivers/usb/dwc2/drd.c:114:5: note: did you mean 'dwc2_hsotg_core_connect'? drivers/usb/dwc2/core.h:1428:20: note: 'dwc2_hsotg_core_connect' declared here static inline void dwc2_hsotg_core_connect(struct dwc2_hsotg *hsotg) {} ^ 2 errors generated. vim +80 drivers/usb/dwc2/drd.c 68 69 static int dwc2_drd_role_sw_set(struct usb_role_switch *sw, enum usb_role role) 70 { 71 struct dwc2_hsotg *hsotg = usb_role_switch_get_drvdata(sw); 72 unsigned long flags; 73 74 /* Skip session not in line with dr_mode */ 75 if ((role == USB_ROLE_DEVICE && hsotg->dr_mode == USB_DR_MODE_HOST) || 76 (role == USB_ROLE_HOST && hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)) 77 return -EINVAL; 78 79 /* Skip session if core is in test mode */ > 80 if (role == USB_ROLE_NONE && hsotg->test_mode) { 81 dev_dbg(hsotg->dev, "Core is in test mode\n"); 82 return -EBUSY; 83 } 84 85 spin_lock_irqsave(&hsotg->lock, flags); 86 87 if (role == USB_ROLE_HOST) { 88 if (dwc2_ovr_avalid(hsotg, true)) 89 goto unlock; 90 91 if (hsotg->dr_mode == USB_DR_MODE_OTG) 92 /* 93 * This will raise a Connector ID Status Change 94 * Interrupt - connID A 95 */ 96 dwc2_force_mode(hsotg, true); 97 } else if (role == USB_ROLE_DEVICE) { 98 if (dwc2_ovr_bvalid(hsotg, true)) 99 goto unlock; 100 101 if (hsotg->dr_mode == USB_DR_MODE_OTG) 102 /* 103 * This will raise a Connector ID Status Change 104 * Interrupt - connID B 105 */ 106 dwc2_force_mode(hsotg, false); 107 108 /* This clear DCTL.SFTDISCON bit */ 109 dwc2_hsotg_core_connect(hsotg); 110 } else { 111 if (dwc2_is_device_mode(hsotg)) { 112 if (!dwc2_ovr_bvalid(hsotg, false)) 113 /* This set DCTL.SFTDISCON bit */ > 114 dwc2_hsotg_core_disconnect(hsotg); 115 } else { 116 dwc2_ovr_avalid(hsotg, false); 117 } 118 } 119 120 unlock: 121 spin_unlock_irqrestore(&hsotg->lock, flags); 122 123 dev_dbg(hsotg->dev, "%s-session valid\n", 124 role == USB_ROLE_NONE ? "No" : 125 role == USB_ROLE_HOST ? "A" : "B"); 126 127 return 0; 128 } 129 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org