drivers/iio/imu/inv_icm42607/inv_icm42607_temp.c:45:22: error: implicit declaration of function 'FIELD_GET'
kernel test robot <[email protected]> Tue, 04 Aug 2026 04:45:51 +0800
| Newsgroups | dev.linux.lists.oe-kbuild |
|---|---|
| Message-ID | <[email protected]> |
:::::: :::::: Manual check reason: "bisect to a FBC not belonging to original linux-review patches: branch: linux-review/Chris-Morgan/dt-bindings-iio-imu-icm42600-Add-mount-matrix/20260728-053131, commit: 140aab1534e8bbe68a79b7dde3062baf3e6d8e37" :::::: BCC: [email protected] CC: [email protected] TO: Chris Morgan <[email protected]> CC: 0day robot <[email protected]> tree: https://github.com/intel-lab-lkp/linux/commits/Chris-Morgan/dt-bindings-iio-imu-icm42600-Add-mount-matrix/20260728-053131 head: 3b6203ea85a8fd56d5a9496998585e247cd94164 commit: 140aab1534e8bbe68a79b7dde3062baf3e6d8e37 iio: imu: inv_icm42607: Add Temp Support in icm42607 date: 7 days ago :::::: branch date: 7 days ago :::::: commit date: 7 days ago config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20260804/[email protected]/config) compiler: nios2-linux-gcc (GCC) 11.5.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260804/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/r/[email protected]/ All errors (new ones prefixed by >>): drivers/iio/imu/inv_icm42607/inv_icm42607_temp.c: In function 'inv_icm42607_temp_read': >> drivers/iio/imu/inv_icm42607/inv_icm42607_temp.c:45:22: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration] 45 | accel_mode = FIELD_GET(INV_ICM42607_PWR_MGMT0_ACCEL_MODE_MASK, val); | ^~~~~~~~~ cc1: some warnings being treated as errors vim +/FIELD_GET +45 drivers/iio/imu/inv_icm42607/inv_icm42607_temp.c 140aab1534e8bb Chris Morgan 2026-07-27 18 140aab1534e8bb Chris Morgan 2026-07-27 19 static int inv_icm42607_temp_read(struct inv_icm42607_state *st, s16 *temp) 140aab1534e8bb Chris Morgan 2026-07-27 20 { 140aab1534e8bb Chris Morgan 2026-07-27 21 struct inv_icm42607_sensor_conf conf = INV_ICM42607_SENSOR_CONF_INIT; 140aab1534e8bb Chris Morgan 2026-07-27 22 struct device *dev = regmap_get_device(st->map); 140aab1534e8bb Chris Morgan 2026-07-27 23 int ret, gyro_mode, accel_mode; 140aab1534e8bb Chris Morgan 2026-07-27 24 unsigned int val; 140aab1534e8bb Chris Morgan 2026-07-27 25 u8 raw[2]; 140aab1534e8bb Chris Morgan 2026-07-27 26 140aab1534e8bb Chris Morgan 2026-07-27 27 PM_RUNTIME_ACQUIRE_AUTOSUSPEND(dev, pm); 140aab1534e8bb Chris Morgan 2026-07-27 28 ret = PM_RUNTIME_ACQUIRE_ERR(&pm); 140aab1534e8bb Chris Morgan 2026-07-27 29 if (ret) 140aab1534e8bb Chris Morgan 2026-07-27 30 return ret; 140aab1534e8bb Chris Morgan 2026-07-27 31 140aab1534e8bb Chris Morgan 2026-07-27 32 guard(mutex)(&st->lock); 140aab1534e8bb Chris Morgan 2026-07-27 33 140aab1534e8bb Chris Morgan 2026-07-27 34 /* 140aab1534e8bb Chris Morgan 2026-07-27 35 * Check if both the gyro and accel are off and if so, enable one 140aab1534e8bb Chris Morgan 2026-07-27 36 * of them. The temp sensor cannot be read if both the gyro and 140aab1534e8bb Chris Morgan 2026-07-27 37 * accel sensor are off. Prefer to enable the accel over the gyro 140aab1534e8bb Chris Morgan 2026-07-27 38 * as the datasheet says the gyro uses 5x more power and it has 140aab1534e8bb Chris Morgan 2026-07-27 39 * a minimum run time of 45ms. 140aab1534e8bb Chris Morgan 2026-07-27 40 */ 140aab1534e8bb Chris Morgan 2026-07-27 41 ret = regmap_read(st->map, INV_ICM42607_REG_PWR_MGMT0, &val); 140aab1534e8bb Chris Morgan 2026-07-27 42 if (ret) 140aab1534e8bb Chris Morgan 2026-07-27 43 return ret; 140aab1534e8bb Chris Morgan 2026-07-27 44 140aab1534e8bb Chris Morgan 2026-07-27 @45 accel_mode = FIELD_GET(INV_ICM42607_PWR_MGMT0_ACCEL_MODE_MASK, val); 140aab1534e8bb Chris Morgan 2026-07-27 46 gyro_mode = FIELD_GET(INV_ICM42607_PWR_MGMT0_GYRO_MODE_MASK, val); 140aab1534e8bb Chris Morgan 2026-07-27 47 if (!gyro_mode && !accel_mode) { 140aab1534e8bb Chris Morgan 2026-07-27 48 /* enable accel sensor */ 140aab1534e8bb Chris Morgan 2026-07-27 49 conf.mode = INV_ICM42607_SENSOR_MODE_LOW_NOISE; 140aab1534e8bb Chris Morgan 2026-07-27 50 ret = inv_icm42607_set_sensor_conf(st, &conf, IIO_ACCEL); 140aab1534e8bb Chris Morgan 2026-07-27 51 if (ret) 140aab1534e8bb Chris Morgan 2026-07-27 52 return ret; 140aab1534e8bb Chris Morgan 2026-07-27 53 } 140aab1534e8bb Chris Morgan 2026-07-27 54 140aab1534e8bb Chris Morgan 2026-07-27 55 ret = regmap_bulk_read(st->map, INV_ICM42607_REG_TEMP_DATA1, 140aab1534e8bb Chris Morgan 2026-07-27 56 raw, sizeof(raw)); 140aab1534e8bb Chris Morgan 2026-07-27 57 if (ret) 140aab1534e8bb Chris Morgan 2026-07-27 58 return ret; 140aab1534e8bb Chris Morgan 2026-07-27 59 140aab1534e8bb Chris Morgan 2026-07-27 60 *temp = get_unaligned_be16(raw); 140aab1534e8bb Chris Morgan 2026-07-27 61 if (*temp == INV_ICM42607_DATA_INVALID) 140aab1534e8bb Chris Morgan 2026-07-27 62 return -EINVAL; 140aab1534e8bb Chris Morgan 2026-07-27 63 140aab1534e8bb Chris Morgan 2026-07-27 64 return 0; 140aab1534e8bb Chris Morgan 2026-07-27 65 } 140aab1534e8bb Chris Morgan 2026-07-27 66 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki