CC: [email protected] BCC: [email protected] CC: Linux Memory Management List <[email protected]> TO: Jagath Jog J <[email protected]> CC: Jonathan Cameron <[email protected]>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 3b87ed7ea4d598c81a03317a92dfbd59102224fd commit: 3cf122c20bf835b53e8d2074611d68b7822be782 [2009/11568] iio: accel: bma400: 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/archive/20220720/[email protected]/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 <[email protected]> Reported-by: Dan Carpenter <[email protected]> smatch warnings: drivers/iio/accel/bma400_core.c:1091 bma400_activity_event_en() error: uninitialized 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_event_en(struct bma400_data *data, 3cf122c20bf835 Jagath Jog J 2022-05-05 1046 enum iio_event_direction 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, field_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 = BMA400_GEN1INT_CONFIG0; 3cf122c20bf835 Jagath Jog J 2022-05-05 1054 msk = BMA400_INT_GEN1_MSK; 3cf122c20bf835 Jagath Jog J 2022-05-05 1055 value = 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_INT_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 = BMA400_GEN2INT_CONFIG0; 3cf122c20bf835 Jagath Jog J 2022-05-05 1061 msk = BMA400_INT_GEN2_MSK; 3cf122c20bf835 Jagath Jog J 2022-05-05 1062 value = 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_INT_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 interrupt evaluation */ 3cf122c20bf835 Jagath Jog J 2022-05-05 1071 ret = regmap_write(data->regmap, 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 axis for interrupt evaluation */ 3cf122c20bf835 Jagath Jog J 2022-05-05 1076 ret = regmap_write(data->regmap, 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 interrupts while enabling*/ 3cf122c20bf835 Jagath Jog J 2022-05-05 1081 ret = regmap_write(data->regmap, 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 = regmap_write(data->regmap, 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 = regmap_update_bits(data->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 = regmap_update_bits(data->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 _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
