Hi Dmitry, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on v5.12-rc6] [also build test WARNING on next-20210409] [cannot apply to mkp-scsi/for-next scsi/for-next target/for-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Dmitry-Bogdanov/target-make-tpg-enable-attribute/20210409-204948 base: e49d033bddf5b565044e2abe4241353959bc9120 config: x86_64-randconfig-a001-20210409 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6) 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 # https://github.com/0day-ci/linux/commit/8e8e5665329866acf6ace2b3e349e4a0449b8044 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Dmitry-Bogdanov/target-make-tpg-enable-attribute/20210409-204948 git checkout 8e8e5665329866acf6ace2b3e349e4a0449b8044 # 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 <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): >> drivers/usb/gadget/function/f_tcm.c:1510:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if (enable) ^~~~~~ drivers/usb/gadget/function/f_tcm.c:1514:6: note: uninitialized use occurs here if (ret) ^~~ drivers/usb/gadget/function/f_tcm.c:1510:2: note: remove the 'if' if its condition is always true if (enable) ^~~~~~~~~~~ drivers/usb/gadget/function/f_tcm.c:1508:9: note: initialize the variable 'ret' to silence this warning int ret; ^ = 0 1 warning generated. vim +1510 drivers/usb/gadget/function/f_tcm.c 1504 1505 static int usbg_enable_tpg(struct se_portal_group *se_tpg, bool enable) 1506 { 1507 struct usbg_tpg *tpg = container_of(se_tpg, struct usbg_tpg, se_tpg); 1508 int ret; 1509 > 1510 if (enable) 1511 ret = usbg_attach(tpg); 1512 else 1513 usbg_detach(tpg); 1514 if (ret) 1515 return ret; 1516 1517 tpg->gadget_connect = enable; 1518 1519 return 0; 1520 } 1521 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip