From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v3 5/9] iio: accel: bma400: Add separate channel for step counter
Date: Tue, 12 Apr 2022 11:14:26 +0800 [thread overview]
Message-ID: <202204121105.6gY7K5RD-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6096 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
In-Reply-To: <20220411203133.19929-6-jagathjog1996@gmail.com>
References: <20220411203133.19929-6-jagathjog1996@gmail.com>
TO: Jagath Jog J <jagathjog1996@gmail.com>
TO: dan(a)dlrobertson.com
TO: jic23(a)kernel.org
TO: andy.shevchenko(a)gmail.com
CC: linux-iio(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
Hi Jagath,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on v5.18-rc2 next-20220411]
[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/intel-lab-lkp/linux/commits/Jagath-Jog-J/iio-accel-bma400-Add-buffer-step-and-activity-inactivity/20220412-043436
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
:::::: branch date: 6 hours ago
:::::: commit date: 6 hours ago
config: openrisc-randconfig-s031-20220411 (https://download.01.org/0day-ci/archive/20220412/202204121105.6gY7K5RD-lkp(a)intel.com/config)
compiler: or1k-linux-gcc (GCC) 11.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/intel-lab-lkp/linux/commit/24d76bc639c6eedcd5b0e0983fbf1a26c81f3a8a
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Jagath-Jog-J/iio-accel-bma400-Add-buffer-step-and-activity-inactivity/20220412-043436
git checkout 24d76bc639c6eedcd5b0e0983fbf1a26c81f3a8a
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=openrisc SHELL=/bin/bash drivers/iio/accel/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/iio/accel/bma400_core.c:854:42: sparse: sparse: dubious: x & !y
vim +854 drivers/iio/accel/bma400_core.c
465c811f1f201a Dan Robertson 2019-12-20 812
465c811f1f201a Dan Robertson 2019-12-20 813 static int bma400_write_raw(struct iio_dev *indio_dev,
465c811f1f201a Dan Robertson 2019-12-20 814 struct iio_chan_spec const *chan, int val, int val2,
465c811f1f201a Dan Robertson 2019-12-20 815 long mask)
465c811f1f201a Dan Robertson 2019-12-20 816 {
465c811f1f201a Dan Robertson 2019-12-20 817 struct bma400_data *data = iio_priv(indio_dev);
465c811f1f201a Dan Robertson 2019-12-20 818 int ret;
465c811f1f201a Dan Robertson 2019-12-20 819
465c811f1f201a Dan Robertson 2019-12-20 820 switch (mask) {
465c811f1f201a Dan Robertson 2019-12-20 821 case IIO_CHAN_INFO_SAMP_FREQ:
465c811f1f201a Dan Robertson 2019-12-20 822 /*
465c811f1f201a Dan Robertson 2019-12-20 823 * The sample frequency is readonly for the temperature
465c811f1f201a Dan Robertson 2019-12-20 824 * register and a fixed value in low-power mode.
465c811f1f201a Dan Robertson 2019-12-20 825 */
465c811f1f201a Dan Robertson 2019-12-20 826 if (chan->type != IIO_ACCEL)
465c811f1f201a Dan Robertson 2019-12-20 827 return -EINVAL;
465c811f1f201a Dan Robertson 2019-12-20 828
465c811f1f201a Dan Robertson 2019-12-20 829 mutex_lock(&data->mutex);
465c811f1f201a Dan Robertson 2019-12-20 830 ret = bma400_set_accel_output_data_rate(data, val, val2);
465c811f1f201a Dan Robertson 2019-12-20 831 mutex_unlock(&data->mutex);
465c811f1f201a Dan Robertson 2019-12-20 832 return ret;
465c811f1f201a Dan Robertson 2019-12-20 833 case IIO_CHAN_INFO_SCALE:
98496ccdf0dd88 Dan Carpenter 2020-01-16 834 if (val != 0 ||
98496ccdf0dd88 Dan Carpenter 2020-01-16 835 val2 < BMA400_SCALE_MIN || val2 > BMA400_SCALE_MAX)
465c811f1f201a Dan Robertson 2019-12-20 836 return -EINVAL;
465c811f1f201a Dan Robertson 2019-12-20 837
465c811f1f201a Dan Robertson 2019-12-20 838 mutex_lock(&data->mutex);
465c811f1f201a Dan Robertson 2019-12-20 839 ret = bma400_set_accel_scale(data, val2);
465c811f1f201a Dan Robertson 2019-12-20 840 mutex_unlock(&data->mutex);
465c811f1f201a Dan Robertson 2019-12-20 841 return ret;
465c811f1f201a Dan Robertson 2019-12-20 842 case IIO_CHAN_INFO_OVERSAMPLING_RATIO:
465c811f1f201a Dan Robertson 2019-12-20 843 mutex_lock(&data->mutex);
465c811f1f201a Dan Robertson 2019-12-20 844 ret = bma400_set_accel_oversampling_ratio(data, val);
465c811f1f201a Dan Robertson 2019-12-20 845 mutex_unlock(&data->mutex);
465c811f1f201a Dan Robertson 2019-12-20 846 return ret;
24d76bc639c6ee Jagath Jog J 2022-04-12 847 case IIO_CHAN_INFO_ENABLE:
24d76bc639c6ee Jagath Jog J 2022-04-12 848 if (data->steps_enabled == val)
24d76bc639c6ee Jagath Jog J 2022-04-12 849 return 0;
24d76bc639c6ee Jagath Jog J 2022-04-12 850
24d76bc639c6ee Jagath Jog J 2022-04-12 851 mutex_lock(&data->mutex);
24d76bc639c6ee Jagath Jog J 2022-04-12 852 ret = regmap_update_bits(data->regmap, BMA400_INT_CONFIG1_REG,
24d76bc639c6ee Jagath Jog J 2022-04-12 853 BMA400_STEP_INT_MSK,
24d76bc639c6ee Jagath Jog J 2022-04-12 @854 FIELD_PREP(BMA400_STEP_INT_MSK, !!val));
24d76bc639c6ee Jagath Jog J 2022-04-12 855 mutex_unlock(&data->mutex);
24d76bc639c6ee Jagath Jog J 2022-04-12 856 data->steps_enabled = val;
24d76bc639c6ee Jagath Jog J 2022-04-12 857 return ret;
465c811f1f201a Dan Robertson 2019-12-20 858 default:
465c811f1f201a Dan Robertson 2019-12-20 859 return -EINVAL;
465c811f1f201a Dan Robertson 2019-12-20 860 }
465c811f1f201a Dan Robertson 2019-12-20 861 }
465c811f1f201a Dan Robertson 2019-12-20 862
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next reply other threads:[~2022-04-12 3:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-12 3:14 kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-04-11 20:31 [PATCH v3 0/9] iio: accel: bma400: Add buffer, step and activity/inactivity Jagath Jog J
2022-04-11 20:31 ` [PATCH v3 5/9] iio: accel: bma400: Add separate channel for step counter Jagath Jog J
2022-04-16 16:41 ` Jonathan Cameron
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=202204121105.6gY7K5RD-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.