From: kernel test robot <lkp@intel.com>
To: Angel Iglesias <ang.iglesiasg@gmail.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Angel Iglesias <ang.iglesiasg@gmail.com>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Paul Cercueil <paul@crapouillou.net>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: pressure: bmp280: Add support for BMP380 sensor family
Date: Sun, 26 Jun 2022 00:49:21 +0800 [thread overview]
Message-ID: <202206260003.Ptgw2sOp-lkp@intel.com> (raw)
In-Reply-To: <20220625150921.47769-1-ang.iglesiasg@gmail.com>
Hi Angel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on jic23-iio/togreg]
[also build test WARNING on robh/for-next linus/master v5.19-rc3 next-20220624]
[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/Angel-Iglesias/dt-bindings-iio-pressure-bmp085-Add-BMP380-compatible-string/20220625-231424
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: x86_64-randconfig-a001
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 42a7ddb428c999229491b0effbb1a4059149fba8)
reproduce (this is a W=1 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/intel-lab-lkp/linux/commit/56e3f8aecddacdbe204fbe5e28032ef2befae647
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Angel-Iglesias/dt-bindings-iio-pressure-bmp085-Add-BMP380-compatible-string/20220625-231424
git checkout 56e3f8aecddacdbe204fbe5e28032ef2befae647
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/iio/pressure/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/iio/pressure/bmp280-core.c:1000:10: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand]
if (tmp && BMP380_ERR_CONF_MASK) {
^ ~~~~~~~~~~~~~~~~~~~~
drivers/iio/pressure/bmp280-core.c:1000:10: note: use '&' for a bitwise operation
if (tmp && BMP380_ERR_CONF_MASK) {
^~
&
drivers/iio/pressure/bmp280-core.c:1000:10: note: remove constant to silence this warning
if (tmp && BMP380_ERR_CONF_MASK) {
~^~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +1000 drivers/iio/pressure/bmp280-core.c
945
946 static int bmp380_chip_config(struct bmp280_data *data)
947 {
948 u8 osrs;
949 unsigned int tmp;
950 int ret;
951
952 /* configure power control register */
953 ret = regmap_write_bits(data->regmap, BMP380_REG_POWER_CONTROL,
954 BMP380_CTRL_SENSORS_MASK |
955 BMP380_MODE_MASK,
956 BMP380_CTRL_SENSORS_PRESS_EN |
957 BMP380_CTRL_SENSORS_TEMP_EN |
958 BMP380_MODE_NORMAL);
959 if (ret < 0) {
960 dev_err(data->dev,
961 "failed to write operation control register\n");
962 return ret;
963 }
964
965 /* configure oversampling */
966 osrs = BMP380_OSRS_TEMP_X(data->oversampling_temp) |
967 BMP380_OSRS_PRESS_X(data->oversampling_press);
968
969 ret = regmap_write_bits(data->regmap, BMP380_REG_OSR,
970 BMP380_OSRS_TEMP_MASK | BMP380_OSRS_PRESS_MASK,
971 osrs);
972 if (ret < 0) {
973 dev_err(data->dev, "failed to write oversampling register\n");
974 return ret;
975 }
976
977 /* configure output data rate */
978 ret = regmap_write_bits(data->regmap, BMP380_REG_ODR,
979 BMP380_ODRS_MASK, BMP380_ODRS_50HZ);
980 if (ret < 0) {
981 dev_err(data->dev, "failed to write ODR selection register\n");
982 return ret;
983 }
984
985 /* set filter data */
986 ret = regmap_update_bits(data->regmap, BMP380_REG_CONFIG,
987 BMP380_FILTER_MASK, BMP380_FILTER_3X);
988 if (ret < 0) {
989 dev_err(data->dev, "failed to write config register\n");
990 return ret;
991 }
992
993 /* check config error flag */
994 ret = regmap_read(data->regmap, BMP380_REG_ERROR, &tmp);
995 if (ret < 0) {
996 dev_err(data->dev,
997 "failed to read error register\n");
998 return ret;
999 }
> 1000 if (tmp && BMP380_ERR_CONF_MASK) {
1001 dev_warn(data->dev,
1002 "sensor flagged configuration as incompatible\n");
1003 ret = -EINVAL;
1004 }
1005
1006 return ret;
1007 }
1008
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-06-25 16:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-25 15:09 [PATCH 2/3] iio: pressure: bmp280: Add support for BMP380 sensor family Angel Iglesias
2022-06-25 15:46 ` Jonathan Cameron
2022-06-27 15:42 ` Angel Iglesias
2022-07-16 16:03 ` Jonathan Cameron
2022-06-25 16:49 ` kernel test robot [this message]
2022-06-25 17:59 ` kernel test robot
2022-06-25 20:11 ` kernel test robot
2022-06-25 20:11 ` kernel test robot
2022-06-26 1:24 ` kernel test robot
2022-06-27 7:37 ` Dan Carpenter
2022-06-27 14:48 ` Angel Iglesias
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=202206260003.Ptgw2sOp-lkp@intel.com \
--to=lkp@intel.com \
--cc=ang.iglesiasg@gmail.com \
--cc=jic23@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=paul@crapouillou.net \
--cc=rafael.j.wysocki@intel.com \
--cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox