devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Remi Buisson via B4 Relay"
	<devnull+remi.buisson.tdk.com@kernel.org>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	Remi Buisson <remi.buisson@tdk.com>
Subject: Re: [PATCH v2 6/8] iio: imu: inv_icm45600: add SPI driver for inv_icm45600 driver
Date: Fri, 11 Jul 2025 12:55:25 +0800	[thread overview]
Message-ID: <202507111201.r62j5rb6-lkp@intel.com> (raw)
In-Reply-To: <20250710-add_newport_driver-v2-6-bf76d8142ef2@tdk.com>

Hi Remi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on f8f559752d573a051a984adda8d2d1464f92f954]

url:    https://github.com/intel-lab-lkp/linux/commits/Remi-Buisson-via-B4-Relay/dt-bindings-iio-imu-Add-inv_icm45600/20250710-170143
base:   f8f559752d573a051a984adda8d2d1464f92f954
patch link:    https://lore.kernel.org/r/20250710-add_newport_driver-v2-6-bf76d8142ef2%40tdk.com
patch subject: [PATCH v2 6/8] iio: imu: inv_icm45600: add SPI driver for inv_icm45600 driver
config: mips-randconfig-r072-20250711 (https://download.01.org/0day-ci/archive/20250711/202507111201.r62j5rb6-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 01c97b4953e87ae455bd4c41e3de3f0f0f29c61c)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250711/202507111201.r62j5rb6-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/oe-kbuild-all/202507111201.r62j5rb6-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c:107:7: warning: variable 'sleep' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     107 |                 if (*scan_mask & (BIT(INV_ICM45600_ACCEL_SCAN_X) |
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     108 |                                  BIT(INV_ICM45600_ACCEL_SCAN_Y) |
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     109 |                                  BIT(INV_ICM45600_ACCEL_SCAN_Z))) {
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c:123:6: note: uninitialized use occurs here
     123 |         if (sleep)
         |             ^~~~~
   drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c:107:3: note: remove the 'if' if its condition is always true
     107 |                 if (*scan_mask & (BIT(INV_ICM45600_ACCEL_SCAN_X) |
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     108 |                                  BIT(INV_ICM45600_ACCEL_SCAN_Y) |
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     109 |                                  BIT(INV_ICM45600_ACCEL_SCAN_Z))) {
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c:100:20: note: initialize the variable 'sleep' to silence this warning
     100 |         unsigned int sleep;
         |                           ^
         |                            = 0
   1 warning generated.
--
>> drivers/iio/imu/inv_icm45600/inv_icm45600_gyro.c:107:7: warning: variable 'sleep' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
     107 |                 if (*scan_mask & (BIT(INV_ICM45600_GYRO_SCAN_X) |
         |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     108 |                                  BIT(INV_ICM45600_GYRO_SCAN_Y) |
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     109 |                                  BIT(INV_ICM45600_GYRO_SCAN_Z))) {
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/imu/inv_icm45600/inv_icm45600_gyro.c:121:6: note: uninitialized use occurs here
     121 |         if (sleep)
         |             ^~~~~
   drivers/iio/imu/inv_icm45600/inv_icm45600_gyro.c:107:3: note: remove the 'if' if its condition is always true
     107 |                 if (*scan_mask & (BIT(INV_ICM45600_GYRO_SCAN_X) |
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     108 |                                  BIT(INV_ICM45600_GYRO_SCAN_Y) |
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     109 |                                  BIT(INV_ICM45600_GYRO_SCAN_Z))) {
         |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/iio/imu/inv_icm45600/inv_icm45600_gyro.c:100:20: note: initialize the variable 'sleep' to silence this warning
     100 |         unsigned int sleep;
         |                           ^
         |                            = 0
   1 warning generated.


vim +107 drivers/iio/imu/inv_icm45600/inv_icm45600_accel.c

1fb5c2bf7348d06 Remi Buisson 2025-07-10   91  
1fb5c2bf7348d06 Remi Buisson 2025-07-10   92  /* enable accelerometer sensor and FIFO write */
1fb5c2bf7348d06 Remi Buisson 2025-07-10   93  static int inv_icm45600_accel_update_scan_mode(struct iio_dev *indio_dev,
1fb5c2bf7348d06 Remi Buisson 2025-07-10   94  					       const unsigned long *scan_mask)
1fb5c2bf7348d06 Remi Buisson 2025-07-10   95  {
1fb5c2bf7348d06 Remi Buisson 2025-07-10   96  	struct inv_icm45600_state *st = iio_device_get_drvdata(indio_dev);
1fb5c2bf7348d06 Remi Buisson 2025-07-10   97  	struct inv_icm45600_sensor_state *accel_st = iio_priv(indio_dev);
1fb5c2bf7348d06 Remi Buisson 2025-07-10   98  	struct inv_icm45600_sensor_conf conf = INV_ICM45600_SENSOR_CONF_INIT;
1fb5c2bf7348d06 Remi Buisson 2025-07-10   99  	unsigned int fifo_en = 0;
1fb5c2bf7348d06 Remi Buisson 2025-07-10  100  	unsigned int sleep;
1fb5c2bf7348d06 Remi Buisson 2025-07-10  101  	int ret;
1fb5c2bf7348d06 Remi Buisson 2025-07-10  102  
1fb5c2bf7348d06 Remi Buisson 2025-07-10  103  	scoped_guard(mutex, &st->lock) {
1fb5c2bf7348d06 Remi Buisson 2025-07-10  104  		if (*scan_mask & BIT(INV_ICM45600_ACCEL_SCAN_TEMP))
1fb5c2bf7348d06 Remi Buisson 2025-07-10  105  			fifo_en |= INV_ICM45600_SENSOR_TEMP;
1fb5c2bf7348d06 Remi Buisson 2025-07-10  106  
1fb5c2bf7348d06 Remi Buisson 2025-07-10 @107  		if (*scan_mask & (BIT(INV_ICM45600_ACCEL_SCAN_X) |
1fb5c2bf7348d06 Remi Buisson 2025-07-10  108  				 BIT(INV_ICM45600_ACCEL_SCAN_Y) |
1fb5c2bf7348d06 Remi Buisson 2025-07-10  109  				 BIT(INV_ICM45600_ACCEL_SCAN_Z))) {
1fb5c2bf7348d06 Remi Buisson 2025-07-10  110  			/* enable accel sensor */
1fb5c2bf7348d06 Remi Buisson 2025-07-10  111  			conf.mode = accel_st->power_mode;
1fb5c2bf7348d06 Remi Buisson 2025-07-10  112  			ret = inv_icm45600_set_accel_conf(st, &conf, &sleep);
1fb5c2bf7348d06 Remi Buisson 2025-07-10  113  			if (ret)
1fb5c2bf7348d06 Remi Buisson 2025-07-10  114  				return ret;
1fb5c2bf7348d06 Remi Buisson 2025-07-10  115  			fifo_en |= INV_ICM45600_SENSOR_ACCEL;
1fb5c2bf7348d06 Remi Buisson 2025-07-10  116  		}
1fb5c2bf7348d06 Remi Buisson 2025-07-10  117  
1fb5c2bf7348d06 Remi Buisson 2025-07-10  118  		/* Update data FIFO write. */
1fb5c2bf7348d06 Remi Buisson 2025-07-10  119  		ret = inv_icm45600_buffer_set_fifo_en(st, fifo_en | st->fifo.en);
1fb5c2bf7348d06 Remi Buisson 2025-07-10  120  	}
1fb5c2bf7348d06 Remi Buisson 2025-07-10  121  
1fb5c2bf7348d06 Remi Buisson 2025-07-10  122  	/* Sleep required time. */
1fb5c2bf7348d06 Remi Buisson 2025-07-10  123  	if (sleep)
1fb5c2bf7348d06 Remi Buisson 2025-07-10  124  		msleep(sleep);
1fb5c2bf7348d06 Remi Buisson 2025-07-10  125  
1fb5c2bf7348d06 Remi Buisson 2025-07-10  126  	return ret;
1fb5c2bf7348d06 Remi Buisson 2025-07-10  127  }
1fb5c2bf7348d06 Remi Buisson 2025-07-10  128  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  reply	other threads:[~2025-07-11  4:55 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-10  8:57 [PATCH v2 0/8] iio: imu: new inv_icm45600 driver Remi Buisson via B4 Relay
2025-07-10  8:57 ` [PATCH v2 1/8] dt-bindings: iio: imu: Add inv_icm45600 Remi Buisson via B4 Relay
2025-07-10 22:41   ` Rob Herring
2025-07-11 11:40     ` Remi Buisson
2025-07-14  5:38   ` Krzysztof Kozlowski
2025-07-15  8:35     ` Remi Buisson
2025-07-15 12:16       ` Krzysztof Kozlowski
2025-07-16 14:31         ` Remi Buisson
2025-08-19 10:19     ` Remi Buisson
     [not found]     ` <FR2PPF4571F02BC2C08BFD80F57AC4F45AA8C30A@FR2PPF4571F02BC.DEUP281.PROD.OUTLOOK.COM>
2025-08-19 14:28       ` Krzysztof Kozlowski
2025-08-19 14:53         ` Remi Buisson
2025-07-10  8:57 ` [PATCH v2 2/8] iio: imu: inv_icm45600: add new inv_icm45600 driver Remi Buisson via B4 Relay
2025-07-10  9:29   ` Andy Shevchenko
2025-07-11 11:39     ` Remi Buisson
     [not found]     ` <FR2PPF4571F02BC5366477EC02E9C44041A8C4BA@FR2PPF4571F02BC.DEUP281.PROD.OUTLOOK.COM>
2025-07-11 11:55       ` Andy Shevchenko
2025-07-15  9:11         ` Remi Buisson
2025-07-15 10:42           ` Andy Shevchenko
2025-07-15 15:26             ` Remi Buisson
2025-07-16  9:25               ` Andy Shevchenko
2025-07-11  2:58   ` kernel test robot
2025-07-13 16:00   ` Jonathan Cameron
2025-07-15  9:33     ` Remi Buisson
2025-07-10  8:57 ` [PATCH v2 3/8] iio: imu: inv_icm45600: add buffer support in iio devices Remi Buisson via B4 Relay
2025-07-17 14:33   ` Jonathan Cameron
2025-08-11 14:13     ` Remi Buisson
2025-08-16 11:17       ` Jonathan Cameron
2025-08-20 13:34         ` Remi Buisson
2025-07-10  8:57 ` [PATCH v2 4/8] iio: imu: inv_icm45600: add IMU IIO devices Remi Buisson via B4 Relay
2025-07-17 14:47   ` Jonathan Cameron
2025-08-11 14:56     ` Remi Buisson
2025-07-10  8:58 ` [PATCH v2 5/8] iio: imu: inv_icm45600: add I2C driver for inv_icm45600 driver Remi Buisson via B4 Relay
2025-07-11  7:24   ` kernel test robot
2025-07-14 20:21   ` Dan Carpenter
2025-07-15  8:09     ` Andy Shevchenko
2025-07-15  9:17     ` Remi Buisson
2025-07-10  8:58 ` [PATCH v2 6/8] iio: imu: inv_icm45600: add SPI " Remi Buisson via B4 Relay
2025-07-11  4:55   ` kernel test robot [this message]
2025-07-11  6:09     ` Andy Shevchenko
2025-07-15  9:18       ` Remi Buisson
2025-07-10  8:58 ` [PATCH v2 7/8] iio: imu: inv_icm45600: add I3C " Remi Buisson via B4 Relay
2025-07-14 12:56   ` Sean Nyekjaer
2025-07-15  8:48     ` Remi Buisson
2025-07-10  8:58 ` [PATCH v2 8/8] MAINTAINERS: add entry for inv_icm45600 6-axis imu sensor Remi Buisson via B4 Relay
2025-07-14 12:06 ` [PATCH v2 0/8] iio: imu: new inv_icm45600 driver Sean Nyekjaer
2025-07-15  9:03   ` Remi Buisson
2025-07-15  9:18     ` Sean Nyekjaer

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=202507111201.r62j5rb6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=devnull+remi.buisson.tdk.com@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=remi.buisson@tdk.com \
    --cc=robh@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).