From: kernel test robot <lkp@intel.com> To: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Cc: kbuild-all@lists.01.org, linux-usb@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Amelie Delaunay <amelie.delaunay@foss.st.com> Subject: [usb:usb-linus 14/14] drivers/usb/dwc2/drd.c:133:28: error: 'struct dwc2_hsotg' has no member named 'enabled'; did you mean 'hcd_enabled'? Date: Sat, 12 Feb 2022 01:58:06 +0800 [thread overview] Message-ID: <202202112236.AwoOTtHO-lkp@intel.com> (raw) tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus head: 269cbcf7b72de6f0016806d4a0cec1d689b55a87 commit: 269cbcf7b72de6f0016806d4a0cec1d689b55a87 [14/14] usb: dwc2: drd: fix soft connect when gadget is unconfigured config: microblaze-randconfig-r021-20220211 (https://download.01.org/0day-ci/archive/20220211/202202112236.AwoOTtHO-lkp@intel.com/config) compiler: microblaze-linux-gcc (GCC) 11.2.0 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 # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?id=269cbcf7b72de6f0016806d4a0cec1d689b55a87 git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git git fetch --no-tags usb usb-linus git checkout 269cbcf7b72de6f0016806d4a0cec1d689b55a87 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/usb/ 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 >>): In file included from include/linux/err.h:5, from include/linux/clk.h:12, from drivers/usb/dwc2/drd.c:10: drivers/usb/dwc2/drd.c: In function 'dwc2_drd_role_sw_set': >> drivers/usb/dwc2/drd.c:133:28: error: 'struct dwc2_hsotg' has no member named 'enabled'; did you mean 'hcd_enabled'? 133 | if (hsotg->enabled) { | ^~~~~~~ include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) | ^~~~ drivers/usb/dwc2/drd.c:133:17: note: in expansion of macro 'if' 133 | if (hsotg->enabled) { | ^~ >> drivers/usb/dwc2/drd.c:133:28: error: 'struct dwc2_hsotg' has no member named 'enabled'; did you mean 'hcd_enabled'? 133 | if (hsotg->enabled) { | ^~~~~~~ include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) | ^~~~ drivers/usb/dwc2/drd.c:133:17: note: in expansion of macro 'if' 133 | if (hsotg->enabled) { | ^~ >> drivers/usb/dwc2/drd.c:133:28: error: 'struct dwc2_hsotg' has no member named 'enabled'; did you mean 'hcd_enabled'? 133 | if (hsotg->enabled) { | ^~~~~~~ include/linux/compiler.h:69:10: note: in definition of macro '__trace_if_value' 69 | (cond) ? \ | ^~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~~~~~~~~~~~~~ drivers/usb/dwc2/drd.c:133:17: note: in expansion of macro 'if' 133 | if (hsotg->enabled) { | ^~ vim +133 drivers/usb/dwc2/drd.c 104 105 /* 106 * In case of USB_DR_MODE_PERIPHERAL, clock is disabled at the end of 107 * the probe and enabled on udc_start. 108 * If role-switch set is called before the udc_start, we need to enable 109 * the clock to read/write GOTGCTL and GUSBCFG registers to override 110 * mode and sessions. It is the case if cable is plugged at boot. 111 */ 112 if (!hsotg->ll_hw_enabled && hsotg->clk) { 113 int ret = clk_prepare_enable(hsotg->clk); 114 115 if (ret) 116 return ret; 117 } 118 119 spin_lock_irqsave(&hsotg->lock, flags); 120 121 if (role == USB_ROLE_NONE) { 122 /* default operation mode when usb role is USB_ROLE_NONE */ 123 if (hsotg->role_sw_default_mode == USB_DR_MODE_HOST) 124 role = USB_ROLE_HOST; 125 else if (hsotg->role_sw_default_mode == USB_DR_MODE_PERIPHERAL) 126 role = USB_ROLE_DEVICE; 127 } 128 129 if (role == USB_ROLE_HOST) { 130 already = dwc2_ovr_avalid(hsotg, true); 131 } else if (role == USB_ROLE_DEVICE) { 132 already = dwc2_ovr_bvalid(hsotg, true); > 133 if (hsotg->enabled) { 134 /* This clear DCTL.SFTDISCON bit */ 135 dwc2_hsotg_core_connect(hsotg); 136 } 137 } else { 138 if (dwc2_is_device_mode(hsotg)) { 139 if (!dwc2_ovr_bvalid(hsotg, false)) 140 /* This set DCTL.SFTDISCON bit */ 141 dwc2_hsotg_core_disconnect(hsotg); 142 } else { 143 dwc2_ovr_avalid(hsotg, false); 144 } 145 } 146 147 spin_unlock_irqrestore(&hsotg->lock, flags); 148 149 if (!already && hsotg->dr_mode == USB_DR_MODE_OTG) 150 /* This will raise a Connector ID Status Change Interrupt */ 151 dwc2_force_mode(hsotg, role == USB_ROLE_HOST); 152 153 if (!hsotg->ll_hw_enabled && hsotg->clk) 154 clk_disable_unprepare(hsotg->clk); 155 156 dev_dbg(hsotg->dev, "%s-session valid\n", 157 role == USB_ROLE_NONE ? "No" : 158 role == USB_ROLE_HOST ? "A" : "B"); 159 160 return 0; 161 } 162 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com> To: kbuild-all@lists.01.org Subject: [usb:usb-linus 14/14] drivers/usb/dwc2/drd.c:133:28: error: 'struct dwc2_hsotg' has no member named 'enabled'; did you mean 'hcd_enabled'? Date: Sat, 12 Feb 2022 01:58:06 +0800 [thread overview] Message-ID: <202202112236.AwoOTtHO-lkp@intel.com> (raw) [-- Attachment #1: Type: text/plain, Size: 5814 bytes --] tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-linus head: 269cbcf7b72de6f0016806d4a0cec1d689b55a87 commit: 269cbcf7b72de6f0016806d4a0cec1d689b55a87 [14/14] usb: dwc2: drd: fix soft connect when gadget is unconfigured config: microblaze-randconfig-r021-20220211 (https://download.01.org/0day-ci/archive/20220211/202202112236.AwoOTtHO-lkp(a)intel.com/config) compiler: microblaze-linux-gcc (GCC) 11.2.0 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 # https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/commit/?id=269cbcf7b72de6f0016806d4a0cec1d689b55a87 git remote add usb https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git git fetch --no-tags usb usb-linus git checkout 269cbcf7b72de6f0016806d4a0cec1d689b55a87 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=microblaze SHELL=/bin/bash drivers/usb/ 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 >>): In file included from include/linux/err.h:5, from include/linux/clk.h:12, from drivers/usb/dwc2/drd.c:10: drivers/usb/dwc2/drd.c: In function 'dwc2_drd_role_sw_set': >> drivers/usb/dwc2/drd.c:133:28: error: 'struct dwc2_hsotg' has no member named 'enabled'; did you mean 'hcd_enabled'? 133 | if (hsotg->enabled) { | ^~~~~~~ include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) | ^~~~ drivers/usb/dwc2/drd.c:133:17: note: in expansion of macro 'if' 133 | if (hsotg->enabled) { | ^~ >> drivers/usb/dwc2/drd.c:133:28: error: 'struct dwc2_hsotg' has no member named 'enabled'; did you mean 'hcd_enabled'? 133 | if (hsotg->enabled) { | ^~~~~~~ include/linux/compiler.h:58:61: note: in definition of macro '__trace_if_var' 58 | #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond)) | ^~~~ drivers/usb/dwc2/drd.c:133:17: note: in expansion of macro 'if' 133 | if (hsotg->enabled) { | ^~ >> drivers/usb/dwc2/drd.c:133:28: error: 'struct dwc2_hsotg' has no member named 'enabled'; did you mean 'hcd_enabled'? 133 | if (hsotg->enabled) { | ^~~~~~~ include/linux/compiler.h:69:10: note: in definition of macro '__trace_if_value' 69 | (cond) ? \ | ^~~~ include/linux/compiler.h:56:28: note: in expansion of macro '__trace_if_var' 56 | #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) ) | ^~~~~~~~~~~~~~ drivers/usb/dwc2/drd.c:133:17: note: in expansion of macro 'if' 133 | if (hsotg->enabled) { | ^~ vim +133 drivers/usb/dwc2/drd.c 104 105 /* 106 * In case of USB_DR_MODE_PERIPHERAL, clock is disabled at the end of 107 * the probe and enabled on udc_start. 108 * If role-switch set is called before the udc_start, we need to enable 109 * the clock to read/write GOTGCTL and GUSBCFG registers to override 110 * mode and sessions. It is the case if cable is plugged at boot. 111 */ 112 if (!hsotg->ll_hw_enabled && hsotg->clk) { 113 int ret = clk_prepare_enable(hsotg->clk); 114 115 if (ret) 116 return ret; 117 } 118 119 spin_lock_irqsave(&hsotg->lock, flags); 120 121 if (role == USB_ROLE_NONE) { 122 /* default operation mode when usb role is USB_ROLE_NONE */ 123 if (hsotg->role_sw_default_mode == USB_DR_MODE_HOST) 124 role = USB_ROLE_HOST; 125 else if (hsotg->role_sw_default_mode == USB_DR_MODE_PERIPHERAL) 126 role = USB_ROLE_DEVICE; 127 } 128 129 if (role == USB_ROLE_HOST) { 130 already = dwc2_ovr_avalid(hsotg, true); 131 } else if (role == USB_ROLE_DEVICE) { 132 already = dwc2_ovr_bvalid(hsotg, true); > 133 if (hsotg->enabled) { 134 /* This clear DCTL.SFTDISCON bit */ 135 dwc2_hsotg_core_connect(hsotg); 136 } 137 } else { 138 if (dwc2_is_device_mode(hsotg)) { 139 if (!dwc2_ovr_bvalid(hsotg, false)) 140 /* This set DCTL.SFTDISCON bit */ 141 dwc2_hsotg_core_disconnect(hsotg); 142 } else { 143 dwc2_ovr_avalid(hsotg, false); 144 } 145 } 146 147 spin_unlock_irqrestore(&hsotg->lock, flags); 148 149 if (!already && hsotg->dr_mode == USB_DR_MODE_OTG) 150 /* This will raise a Connector ID Status Change Interrupt */ 151 dwc2_force_mode(hsotg, role == USB_ROLE_HOST); 152 153 if (!hsotg->ll_hw_enabled && hsotg->clk) 154 clk_disable_unprepare(hsotg->clk); 155 156 dev_dbg(hsotg->dev, "%s-session valid\n", 157 role == USB_ROLE_NONE ? "No" : 158 role == USB_ROLE_HOST ? "A" : "B"); 159 160 return 0; 161 } 162 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next reply other threads:[~2022-02-11 17:59 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-11 17:58 kernel test robot [this message] 2022-02-11 17:58 ` [usb:usb-linus 14/14] drivers/usb/dwc2/drd.c:133:28: error: 'struct dwc2_hsotg' has no member named 'enabled'; did you mean 'hcd_enabled'? kernel test robot 2022-02-12 9:08 ` Greg Kroah-Hartman 2022-02-12 9:08 ` Greg Kroah-Hartman
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=202202112236.AwoOTtHO-lkp@intel.com \ --to=lkp@intel.com \ --cc=amelie.delaunay@foss.st.com \ --cc=fabrice.gasnier@foss.st.com \ --cc=gregkh@linuxfoundation.org \ --cc=kbuild-all@lists.01.org \ --cc=linux-usb@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.