lkml.org 
[lkml]   [2022]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] iio: pressure: bmp280: Add support for BMP380 sensor family
Hi Angel,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on jic23-iio/togreg]
[also build test ERROR 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: i386-randconfig-a002
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=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>, old 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.
--
>> ERROR: modpost: "__divdi3" [drivers/iio/pressure/bmp280.ko] undefined!


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

\
 
 \ /
  Last update: 2022-06-25 20:02    [W:0.118 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site