All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com
Subject: drivers/iio/imu/inv_icm42607/inv_icm42607_temp.c:45:22: error: implicit declaration of function 'FIELD_GET'
Date: Tue, 04 Aug 2026 04:45:51 +0800	[thread overview]
Message-ID: <202608040410.Ph7dONVc-lkp@intel.com> (raw)

:::::: 
:::::: 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: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: Chris Morgan <macromorgan@hotmail.com>
CC: 0day robot <lkp@intel.com>

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/202608040410.Ph7dONVc-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260804/202608040410.Ph7dONVc-lkp@intel.com/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 <lkp@intel.com>
| Closes: https://lore.kernel.org/r/202608040410.Ph7dONVc-lkp@intel.com/

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

                 reply	other threads:[~2026-08-03 20:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202608040410.Ph7dONVc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild@lists.linux.dev \
    /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.