From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============5880331567016725345==" MIME-Version: 1.0 From: kernel test robot Subject: [linux-next:master 2009/11568] drivers/iio/accel/bma400_core.c:1091 bma400_activity_event_en() error: uninitialized symbol 'field_value'. Date: Wed, 20 Jul 2022 01:36:21 +0800 Message-ID: <202207200113.NBRK82vS-lkp@intel.com> List-Id: To: kbuild@lists.01.org --===============5880331567016725345== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable CC: kbuild-all(a)lists.01.org BCC: lkp(a)intel.com CC: Linux Memory Management List TO: Jagath Jog J CC: Jonathan Cameron tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git= master head: 3b87ed7ea4d598c81a03317a92dfbd59102224fd commit: 3cf122c20bf835b53e8d2074611d68b7822be782 [2009/11568] iio: accel: b= ma400: Add support for activity and inactivity events :::::: branch date: 8 hours ago :::::: commit date: 5 weeks ago config: i386-randconfig-m041-20220718 (https://download.01.org/0day-ci/arch= ive/20220720/202207200113.NBRK82vS-lkp(a)intel.com/config) compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/iio/accel/bma400_core.c:1091 bma400_activity_event_en() error: unin= itialized symbol 'field_value'. vim +/field_value +1091 drivers/iio/accel/bma400_core.c d024af5b3970b9 Jagath Jog J 2022-05-05 1044 = 3cf122c20bf835 Jagath Jog J 2022-05-05 1045 static int bma400_activity_ev= ent_en(struct bma400_data *data, 3cf122c20bf835 Jagath Jog J 2022-05-05 1046 enum iio_event_direct= ion dir, 3cf122c20bf835 Jagath Jog J 2022-05-05 1047 int state) 3cf122c20bf835 Jagath Jog J 2022-05-05 1048 { 3cf122c20bf835 Jagath Jog J 2022-05-05 1049 int ret, reg, msk, value, fi= eld_value; 3cf122c20bf835 Jagath Jog J 2022-05-05 1050 = 3cf122c20bf835 Jagath Jog J 2022-05-05 1051 switch (dir) { 3cf122c20bf835 Jagath Jog J 2022-05-05 1052 case IIO_EV_DIR_RISING: 3cf122c20bf835 Jagath Jog J 2022-05-05 1053 reg =3D BMA400_GEN1INT_CONF= IG0; 3cf122c20bf835 Jagath Jog J 2022-05-05 1054 msk =3D BMA400_INT_GEN1_MSK; 3cf122c20bf835 Jagath Jog J 2022-05-05 1055 value =3D 2; 3cf122c20bf835 Jagath Jog J 2022-05-05 1056 set_mask_bits(&field_value,= BMA400_INT_GEN1_MSK, 3cf122c20bf835 Jagath Jog J 2022-05-05 1057 FIELD_PREP(BMA400_IN= T_GEN1_MSK, state)); 3cf122c20bf835 Jagath Jog J 2022-05-05 1058 break; 3cf122c20bf835 Jagath Jog J 2022-05-05 1059 case IIO_EV_DIR_FALLING: 3cf122c20bf835 Jagath Jog J 2022-05-05 1060 reg =3D BMA400_GEN2INT_CONF= IG0; 3cf122c20bf835 Jagath Jog J 2022-05-05 1061 msk =3D BMA400_INT_GEN2_MSK; 3cf122c20bf835 Jagath Jog J 2022-05-05 1062 value =3D 0; 3cf122c20bf835 Jagath Jog J 2022-05-05 1063 set_mask_bits(&field_value,= BMA400_INT_GEN2_MSK, 3cf122c20bf835 Jagath Jog J 2022-05-05 1064 FIELD_PREP(BMA400_IN= T_GEN2_MSK, state)); 3cf122c20bf835 Jagath Jog J 2022-05-05 1065 break; 3cf122c20bf835 Jagath Jog J 2022-05-05 1066 default: 3cf122c20bf835 Jagath Jog J 2022-05-05 1067 return -EINVAL; 3cf122c20bf835 Jagath Jog J 2022-05-05 1068 } 3cf122c20bf835 Jagath Jog J 2022-05-05 1069 = 3cf122c20bf835 Jagath Jog J 2022-05-05 1070 /* Enabling all axis for int= errupt evaluation */ 3cf122c20bf835 Jagath Jog J 2022-05-05 1071 ret =3D regmap_write(data->r= egmap, reg, 0xF8); 3cf122c20bf835 Jagath Jog J 2022-05-05 1072 if (ret) 3cf122c20bf835 Jagath Jog J 2022-05-05 1073 return ret; 3cf122c20bf835 Jagath Jog J 2022-05-05 1074 = 3cf122c20bf835 Jagath Jog J 2022-05-05 1075 /* OR combination of all axi= s for interrupt evaluation */ 3cf122c20bf835 Jagath Jog J 2022-05-05 1076 ret =3D regmap_write(data->r= egmap, reg + BMA400_GEN_CONFIG1_OFF, value); 3cf122c20bf835 Jagath Jog J 2022-05-05 1077 if (ret) 3cf122c20bf835 Jagath Jog J 2022-05-05 1078 return ret; 3cf122c20bf835 Jagath Jog J 2022-05-05 1079 = 3cf122c20bf835 Jagath Jog J 2022-05-05 1080 /* Initial value to avoid in= terrupts while enabling*/ 3cf122c20bf835 Jagath Jog J 2022-05-05 1081 ret =3D regmap_write(data->r= egmap, reg + BMA400_GEN_CONFIG2_OFF, 0x0A); 3cf122c20bf835 Jagath Jog J 2022-05-05 1082 if (ret) 3cf122c20bf835 Jagath Jog J 2022-05-05 1083 return ret; 3cf122c20bf835 Jagath Jog J 2022-05-05 1084 = 3cf122c20bf835 Jagath Jog J 2022-05-05 1085 /* Initial duration value to= avoid interrupts while enabling*/ 3cf122c20bf835 Jagath Jog J 2022-05-05 1086 ret =3D regmap_write(data->r= egmap, reg + BMA400_GEN_CONFIG31_OFF, 0x0F); 3cf122c20bf835 Jagath Jog J 2022-05-05 1087 if (ret) 3cf122c20bf835 Jagath Jog J 2022-05-05 1088 return ret; 3cf122c20bf835 Jagath Jog J 2022-05-05 1089 = 3cf122c20bf835 Jagath Jog J 2022-05-05 1090 ret =3D regmap_update_bits(d= ata->regmap, BMA400_INT1_MAP_REG, msk, 3cf122c20bf835 Jagath Jog J 2022-05-05 @1091 field_value); 3cf122c20bf835 Jagath Jog J 2022-05-05 1092 if (ret) 3cf122c20bf835 Jagath Jog J 2022-05-05 1093 return ret; 3cf122c20bf835 Jagath Jog J 2022-05-05 1094 = 3cf122c20bf835 Jagath Jog J 2022-05-05 1095 ret =3D regmap_update_bits(d= ata->regmap, BMA400_INT_CONFIG0_REG, msk, 3cf122c20bf835 Jagath Jog J 2022-05-05 1096 field_value); 3cf122c20bf835 Jagath Jog J 2022-05-05 1097 if (ret) 3cf122c20bf835 Jagath Jog J 2022-05-05 1098 return ret; 3cf122c20bf835 Jagath Jog J 2022-05-05 1099 = 3cf122c20bf835 Jagath Jog J 2022-05-05 1100 set_mask_bits(&data->generic= _event_en, msk, field_value); 3cf122c20bf835 Jagath Jog J 2022-05-05 1101 return 0; 3cf122c20bf835 Jagath Jog J 2022-05-05 1102 } 3cf122c20bf835 Jagath Jog J 2022-05-05 1103 = -- = 0-DAY CI Kernel Test Service https://01.org/lkp --===============5880331567016725345==--