All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
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	[thread overview]
Message-ID: <202207200113.NBRK82vS-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5463 bytes --]

CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Jagath Jog J <jagathjog1996@gmail.com>
CC: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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/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 <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

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

                 reply	other threads:[~2022-07-19 17:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202207200113.NBRK82vS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.