Content-Type: multipart/mixed; boundary="===============3175740668544929480==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v10 2/5] gpio: sim: new testing module Date: Thu, 25 Nov 2021 04:29:45 +0800 Message-ID: <202111250402.c73il0rL-lkp@intel.com> In-Reply-To: <20211124114257.19878-3-brgl@bgdev.pl> List-Id: --===============3175740668544929480== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Bartosz, I love your patch! Perhaps something to improve: [auto build test WARNING on v5.16-rc2] [cannot apply to shuah-kselftest/next linusw-gpio/for-next next-20211124] [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/Bartosz-Golaszewski/gpio-s= im-configfs-based-GPIO-simulator/20211124-194521 base: 136057256686de39cc3a07c2e39ef6bc43003ff6 config: i386-buildonly-randconfig-r001-20211124 (https://download.01.org/0d= ay-ci/archive/20211125/202111250402.c73il0rL-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 67a1c4= 5def8a75061203461ab0060c75c864df1c) reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/6e279d2416d71b602a9d97147= e762c9ed38d484a git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Bartosz-Golaszewski/gpio-sim-confi= gfs-based-GPIO-simulator/20211124-194521 git checkout 6e279d2416d71b602a9d97147e762c9ed38d484a # save the config file to linux build tree COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 ARCH=3Di386 = If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/gpio/gpio-sim.c:1085:2: warning: variable 'repr' is used uniniti= alized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~~~~~~ drivers/gpio/gpio-sim.c:1090:31: note: uninitialized use occurs here return sprintf(page, "%s\n", repr); ^~~~ drivers/gpio/gpio-sim.c:1068:12: note: initialize the variable 'repr' to= silence this warning char *repr; ^ =3D NULL 1 warning generated. vim +/repr +1085 drivers/gpio/gpio-sim.c 1063 = 1064 static ssize_t gpio_sim_config_hog_direction_show(struct config_item= *item, 1065 char *page) 1066 { 1067 struct gpio_sim_line_ctx *ctx =3D gpio_sim_hog_item_to_line_ctx(ite= m); 1068 char *repr; 1069 int dir; 1070 = 1071 mutex_lock(&ctx->parent->lock); 1072 dir =3D ctx->hog_dir; 1073 mutex_unlock(&ctx->parent->lock); 1074 = 1075 switch (dir) { 1076 case GPIOD_IN: 1077 repr =3D "input"; 1078 break; 1079 case GPIOD_OUT_HIGH: 1080 repr =3D "output-high"; 1081 break; 1082 case GPIOD_OUT_LOW: 1083 repr =3D "output-low"; 1084 break; > 1085 default: 1086 WARN(1, "Unexpected hog direction value: %d", dir); 1087 break; 1088 } 1089 = 1090 return sprintf(page, "%s\n", repr); 1091 } 1092 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3175740668544929480==--