[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<FR2PPF4571F02BCA013695FCD106D12294C8C30A@FR2PPF4571F02BC.DEUP281.PROD.OUTLOOK.COM>
Date: Tue, 19 Aug 2025 12:59:54 +0000
From: Remi Buisson <Remi.Buisson@....com>
To: Jonathan Cameron <jic23@...nel.org>, kernel test robot <lkp@...el.com>
CC: Remi Buisson via B4 Relay <devnull+remi.buisson.tdk.com@...nel.org>,
David
Lechner <dlechner@...libre.com>,
Nuno Sá
<nuno.sa@...log.com>,
Andy Shevchenko <andy@...nel.org>, Rob Herring
<robh@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Conor Dooley
<conor+dt@...nel.org>,
"llvm@...ts.linux.dev" <llvm@...ts.linux.dev>,
"oe-kbuild-all@...ts.linux.dev" <oe-kbuild-all@...ts.linux.dev>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-iio@...r.kernel.org" <linux-iio@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: RE: [PATCH v4 6/9] iio: imu: inv_icm45600: add I2C driver for
inv_icm45600 driver
>
>
>From: Jonathan Cameron <jic23@...nel.org>
>Sent: Saturday, August 16, 2025 2:17 PM
>To: kernel test robot <lkp@...el.com>
>Cc: Remi Buisson via B4 Relay <devnull+remi.buisson.tdk.com@...nel.org>; David Lechner <dlechner@...libre.com>; Nuno Sá <nuno.sa@...log.com>; Andy Shevchenko <andy@...nel.org>; Rob Herring <robh@...nel.org>; Krzysztof Kozlowski <krzk@...nel.org>; Conor Dooley <conor+dt@...nel.org>; llvm@...ts.linux.dev; oe-kbuild-all@...ts.linux.dev; linux-kernel@...r.kernel.org; linux-iio@...r.kernel.org; devicetree@...r.kernel.org; Remi Buisson <Remi.Buisson@....com>
>Subject: Re: [PATCH v4 6/9] iio: imu: inv_icm45600: add I2C driver for inv_icm45600 driver
>
>On Fri, 15 Aug 2025 19:31:38 +0800
>kernel test robot <lkp@...el.com> wrote:
>
>> Hi Remi,
>>
>> kernel test robot noticed the following build warnings:
>>
>> [auto build test WARNING on f8f559752d573a051a984adda8d2d1464f92f954]
>>
>> url: https://urldefense.com/v3/__https://github.com/intel-lab-lkp/linux/commits/Remi-Buisson-via-B4-Relay/dt-bindings-iio-imu-Add-inv_icm45600/20250814-170722__;!!FtrhtPsWDhZ6tw!F9qabDt5bwfglbcpI9BLZqxWbwWpvkG2mzyYKsqinWUQHS_nhAmItbAuiK0WJrglCB2Tz68jK2_K3A$[github[.]com]
>> base: f8f559752d573a051a984adda8d2d1464f92f954
>> patch link: https://urldefense.com/v3/__https://lore.kernel.org/r/20250814-add_newport_driver-v4-6-4464b6600972*40tdk.com__;JQ!!FtrhtPsWDhZ6tw!F9qabDt5bwfglbcpI9BLZqxWbwWpvkG2mzyYKsqinWUQHS_nhAmItbAuiK0WJrglCB2Tz6_26fSx_g$[lore[.]kernel[.]org]
>> patch subject: [PATCH v4 6/9] iio: imu: inv_icm45600: add I2C driver for inv_icm45600 driver
>> config: s390-allmodconfig (https://urldefense.com/v3/__https://download.01.org/0day-ci/archive/20250815/202508151941.BweGaEVT-lkp@intel.com/config__;!!FtrhtPsWDhZ6tw!F9qabDt5bwfglbcpI9BLZqxWbwWpvkG2mzyYKsqinWUQHS_nhAmItbAuiK0WJrglCB2Tz68-fEO74Q$[download[.]01[.]org])
>> compiler: clang version 18.1.8 (https://urldefense.com/v3/__https://github.com/llvm/llvm-project__;!!FtrhtPsWDhZ6tw!F9qabDt5bwfglbcpI9BLZqxWbwWpvkG2mzyYKsqinWUQHS_nhAmItbAuiK0WJrglCB2Tz68RTHifew$[github[.]com] 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
>> reproduce (this is a W=1 build): (https://urldefense.com/v3/__https://download.01.org/0day-ci/archive/20250815/202508151941.BweGaEVT-lkp@intel.com/reproduce__;!!FtrhtPsWDhZ6tw!F9qabDt5bwfglbcpI9BLZqxWbwWpvkG2mzyYKsqinWUQHS_nhAmItbAuiK0WJrglCB2Tz68vQBn8gw$[download[.]01[.]org])
>>
>> 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@...el.com>
>> | Closes: https://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-all/202508151941.BweGaEVT-lkp@intel.com/__;!!FtrhtPsWDhZ6tw!F9qabDt5bwfglbcpI9BLZqxWbwWpvkG2mzyYKsqinWUQHS_nhAmItbAuiK0WJrglCB2Tz68RsxUYZg$[lore[.]kernel[.]org]
>>
>> All warnings (new ones prefixed by >>):
>>
>> >> drivers/iio/imu/inv_icm45600/inv_icm45600_core.c:908:12: warning: result of comparison of constant 32768 with expression of type 's16' (aka 'short') is always false [-Wtautological-constant-out-of-range-compare]
>> 908 | if (*temp == INV_ICM45600_DATA_INVALID)
>> | ~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
>That one will need fixing up.
In last patch, I changed INV_ICM45600_DATA_INVALID from signed value to its corresponding hex value 0x8000.
I'll cast *temp for the comparison.
>
>> drivers/iio/imu/inv_icm45600/inv_icm45600_core.c:785:12: warning: unused function 'inv_icm45600_suspend' [-Wunused-function]
>> 785 | static int inv_icm45600_suspend(struct device *dev)
>> | ^~~~~~~~~~~~~~~~~~~~
>These too me a minute. You have the deprecated functions for actually filling in
>
>+EXPORT_NS_GPL_DEV_PM_OPS(inv_icm45600_pm_ops, IIO_ICM45600) = {
>+ SET_SYSTEM_SLEEP_PM_OPS(inv_icm45600_suspend, inv_icm45600_resume)
>+ SET_RUNTIME_PM_OPS(inv_icm45600_runtime_suspend,
>+ inv_icm45600_runtime_resume, NULL)
>+};
>+
>
>should be
>+EXPORT_NS_GPL_DEV_PM_OPS(inv_icm45600_pm_ops, IIO_ICM45600) = {
>+ SYSTEM_SLEEP_PM_OPS(inv_icm45600_suspend, inv_icm45600_resume)
>+ RUNTIME_PM_OPS(inv_icm45600_runtime_suspend,
>+ inv_icm45600_runtime_resume, NULL)
>+};
>+
>Or use _DEFINE_DEV_PM_OPS() to set all this.
>
Thanks a lot for this, I would never have figured that out !
>> drivers/iio/imu/inv_icm45600/inv_icm45600_core.c:820:12: warning: unused function 'inv_icm45600_resume' [-Wunused-function]
>> 820 | static int inv_icm45600_resume(struct device *dev)
>> | ^~~~~~~~~~~~~~~~~~~
>> drivers/iio/imu/inv_icm45600/inv_icm45600_core.c:860:12: warning: unused function 'inv_icm45600_runtime_suspend' [-Wunused-function]
>> 860 | static int inv_icm45600_runtime_suspend(struct device *dev)
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/iio/imu/inv_icm45600/inv_icm45600_core.c:879:12: warning: unused function 'inv_icm45600_runtime_resume' [-Wunused-function]
>> 879 | static int inv_icm45600_runtime_resume(struct device *dev)
>> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> 5 warnings generated.
>>
>>
>> vim +908 drivers/iio/imu/inv_icm45600/inv_icm45600_core.c
>>
>> 8891b99381240f Remi Buisson 2025-08-14 887
>> 2570c7e48ace35 Remi Buisson 2025-08-14 888 static int _inv_icm45600_temp_read(struct inv_icm45600_state *st, s16 *temp)
>> 2570c7e48ace35 Remi Buisson 2025-08-14 889 {
>> 2570c7e48ace35 Remi Buisson 2025-08-14 890 struct inv_icm45600_sensor_conf conf = INV_ICM45600_SENSOR_CONF_KEEP_VALUES;
>> 2570c7e48ace35 Remi Buisson 2025-08-14 891 int ret;
>> 2570c7e48ace35 Remi Buisson 2025-08-14 892
>> 2570c7e48ace35 Remi Buisson 2025-08-14 893 /* Make sure a sensor is on. */
>> 2570c7e48ace35 Remi Buisson 2025-08-14 894 if (st->conf.gyro.mode == INV_ICM45600_SENSOR_MODE_OFF &&
>> 2570c7e48ace35 Remi Buisson 2025-08-14 895 st->conf.accel.mode == INV_ICM45600_SENSOR_MODE_OFF) {
>> 2570c7e48ace35 Remi Buisson 2025-08-14 896 conf.mode = INV_ICM45600_SENSOR_MODE_LOW_POWER;
>> 2570c7e48ace35 Remi Buisson 2025-08-14 897 ret = inv_icm45600_set_accel_conf(st, &conf, NULL);
>> 2570c7e48ace35 Remi Buisson 2025-08-14 898 if (ret)
>> 2570c7e48ace35 Remi Buisson 2025-08-14 899 return ret;
>> 2570c7e48ace35 Remi Buisson 2025-08-14 900 }
>> 2570c7e48ace35 Remi Buisson 2025-08-14 901
>> 2570c7e48ace35 Remi Buisson 2025-08-14 902 ret = regmap_bulk_read(st->map, INV_ICM45600_REG_TEMP_DATA,
>> 2570c7e48ace35 Remi Buisson 2025-08-14 903 &st->buffer.u16, sizeof(st->buffer.u16));
>> 2570c7e48ace35 Remi Buisson 2025-08-14 904 if (ret)
>> 2570c7e48ace35 Remi Buisson 2025-08-14 905 return ret;
>> 2570c7e48ace35 Remi Buisson 2025-08-14 906
>> 2570c7e48ace35 Remi Buisson 2025-08-14 907 *temp = (s16)le16_to_cpup(&st->buffer.u16);
>> 2570c7e48ace35 Remi Buisson 2025-08-14 @908 if (*temp == INV_ICM45600_DATA_INVALID)
>> 2570c7e48ace35 Remi Buisson 2025-08-14 909 return -EINVAL;
>> 2570c7e48ace35 Remi Buisson 2025-08-14 910
>> 2570c7e48ace35 Remi Buisson 2025-08-14 911 return 0;
>> 2570c7e48ace35 Remi Buisson 2025-08-14 912 }
>> 2570c7e48ace35 Remi Buisson 2025-08-14 913
>>
>
Powered by blists - more mailing lists