On Mon, 30 Sep 2024 07:19:14 -0700 Lars-Peter Clausen <lars@xxxxxxxxxx> wrote: > On 9/30/24 06:49, David Binderman wrote: > > Hello there, > > > > I just tried to build linux-6.12-rc1 with clang. It said: > > > > drivers/iio/imu/bmi323/bmi323_core.c:133:27: warning: variable 'bmi323_ext_reg_savestate' is not needed and will not be emitted [-Wunneeded-internal-declaration] > > > > A grep for the identifier shows the following strange results:: > > > > inux-6.12-rc1 $ grep bmi323_ext_reg_savestate drivers/iio/imu/bmi323/bmi323_core.c > > static const unsigned int bmi323_ext_reg_savestate[] = { > > unsigned int ext_reg_settings[ARRAY_SIZE(bmi323_ext_reg_savestate)]; > > for (unsigned int i = 0; i < ARRAY_SIZE(bmi323_ext_reg_savestate); i++) { > > for (unsigned int i = 0; i < ARRAY_SIZE(bmi323_ext_reg_savestate); i++) { > > linux-6.12-rc1 $ > > > > I see no mention of bmi323_ext_reg_savestate[ i]. Is there a possible > > cut'n'paste error in one of the two for loops ? > Yes. Do you want to send a fix? > Have a couple of fixes queued for this driver (including I Think this one). https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/commit/?h=fixes-togreg&id=506a1ac4c4464a61e4336e135841067dbc040aaa I'm just letting the fixes sit in next for a day or two to make sure nothing else shows up then I'll do a pull request. Jonathan