[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202207040924.TZR7AyQR-lkp@intel.com>
Date: Mon, 4 Jul 2022 10:01:10 +0800
From: kernel test robot <lkp@...el.com>
To: Angel Iglesias <ang.iglesiasg@...il.com>,
Jonathan Cameron <jic23@...nel.org>
Cc: kbuild-all@...ts.01.org, Dan Carpenter <error27@...il.com>,
Angel Iglesias <ang.iglesiasg@...il.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Paul Cercueil <paul@...pouillou.net>,
Ulf Hansson <ulf.hansson@...aro.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/5] 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 69cb6c6556ad89620547318439d6be8bb1629a5a]
url: https://github.com/intel-lab-lkp/linux/commits/Angel-Iglesias/Add-support-for-pressure-sensor-Bosch-BMP380/20220704-083456
base: 69cb6c6556ad89620547318439d6be8bb1629a5a
config: ia64-randconfig-r026-20220703 (https://download.01.org/0day-ci/archive/20220704/202207040924.TZR7AyQR-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 11.3.0
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/3003e6a1c75431265ca5bc938166239ce722c2df
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Angel-Iglesias/Add-support-for-pressure-sensor-Bosch-BMP380/20220704-083456
git checkout 3003e6a1c75431265ca5bc938166239ce722c2df
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/iio/pressure/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
drivers/iio/pressure/bmp280-core.c: In function 'bmp380_chip_config':
>> drivers/iio/pressure/bmp280-core.c:979:33: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
979 | FIELD_PREP(BMP380_MODE_MASK, BMP380_MODE_NORMAL));
| ^~~~~~~~~~
cc1: some warnings being treated as errors
vim +/FIELD_PREP +979 drivers/iio/pressure/bmp280-core.c
967
968 static int bmp380_chip_config(struct bmp280_data *data)
969 {
970 u8 osrs;
971 unsigned int tmp;
972 int ret;
973
974 /* configure power control register */
975 ret = regmap_write_bits(data->regmap, BMP380_REG_POWER_CONTROL,
976 BMP380_CTRL_SENSORS_MASK | BMP380_MODE_MASK,
977 BMP380_CTRL_SENSORS_PRESS_EN |
978 BMP380_CTRL_SENSORS_TEMP_EN |
> 979 FIELD_PREP(BMP380_MODE_MASK, BMP380_MODE_NORMAL));
980 if (ret < 0) {
981 dev_err(data->dev,
982 "failed to write operation control register\n");
983 return ret;
984 }
985
986 /* configure oversampling */
987 osrs = FIELD_PREP(BMP380_OSRS_TEMP_MASK, data->oversampling_temp) |
988 FIELD_PREP(BMP380_OSRS_PRESS_MASK, data->oversampling_press);
989
990 ret = regmap_write_bits(data->regmap, BMP380_REG_OSR,
991 BMP380_OSRS_TEMP_MASK | BMP380_OSRS_PRESS_MASK,
992 osrs);
993 if (ret < 0) {
994 dev_err(data->dev, "failed to write oversampling register\n");
995 return ret;
996 }
997
998 /* configure output data rate */
999 ret = regmap_write_bits(data->regmap, BMP380_REG_ODR,
1000 BMP380_ODRS_MASK, BMP380_ODRS_50HZ);
1001 if (ret < 0) {
1002 dev_err(data->dev, "failed to write ODR selection register\n");
1003 return ret;
1004 }
1005
1006 /* set filter data */
1007 ret = regmap_update_bits(data->regmap, BMP380_REG_CONFIG,
1008 BMP380_FILTER_MASK,
1009 FIELD_PREP(BMP380_FILTER_MASK, BMP380_FILTER_3X));
1010 if (ret < 0) {
1011 dev_err(data->dev, "failed to write config register\n");
1012 return ret;
1013 }
1014
1015 /* wait startup_time before verifying config changes */
1016 usleep_range(data->start_up_time, data->start_up_time + 100);
1017
1018 /* check config error flag */
1019 ret = regmap_read(data->regmap, BMP380_REG_ERROR, &tmp);
1020 if (ret < 0) {
1021 dev_err(data->dev,
1022 "failed to read error register\n");
1023 return ret;
1024 }
1025 if (tmp & BMP380_ERR_CONF_MASK) {
1026 dev_warn(data->dev,
1027 "sensor flagged configuration as incompatible\n");
1028 return -EINVAL;
1029 }
1030
1031 return 0;
1032 }
1033
--
0-DAY CI Kernel Test Service
https://01.org/lkp
Powered by blists - more mailing lists