Re: [PATCH] usb/phy-generic: Add support for OTG VBUS supply control

From: kbuild test robot
Date: Wed May 27 2020 - 13:47:21 EST


Hi Mike,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on balbi-usb/testing/next]
[also build test WARNING on usb/usb-testing v5.7-rc7 next-20200526]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Mike-Looijmans/usb-phy-generic-Add-support-for-OTG-VBUS-supply-control/20200526-225304
base: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
config: x86_64-randconfig-a016-20200527 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 3393cc4cebf9969db94dc424b7a2b6195589c33b)
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
# 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: kbuild test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

>> drivers/usb/phy/phy-generic.c:234:1: warning: non-void function does not return a value in all control paths [-Wreturn-type]
}
^
1 warning generated.

vim +234 drivers/usb/phy/phy-generic.c

205
206 static int nop_set_vbus(struct usb_otg *otg, bool enabled)
207 {
208 struct usb_phy_generic *nop;
209 int ret;
210
211 if (!otg)
212 return -ENODEV;
213
214 nop = container_of(otg->usb_phy, struct usb_phy_generic, phy);
215
216 if (!nop->vbus_reg)
217 return 0;
218
219 if (enabled) {
220 if (nop->vbus_reg_enabled)
221 return 0;
222 ret = regulator_enable(nop->vbus_reg);
223 if (ret < 0)
224 return ret;
225 nop->vbus_reg_enabled = true;
226 } else {
227 if (!nop->vbus_reg_enabled)
228 return 0;
229 ret = regulator_disable(nop->vbus_reg);
230 if (ret < 0)
231 return ret;
232 nop->vbus_reg_enabled = false;
233 }
> 234 }
235

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

Attachment: .config.gz
Description: application/gzip