public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* linux-6.12-rc1/drivers/iio/imu/bmi323/bmi323_core.c:133: Array contents defined but not used ?
@ 2024-09-30 13:49 David Binderman
  2024-09-30 13:58 ` Javier Carrasco
  2024-09-30 14:19 ` Lars-Peter Clausen
  0 siblings, 2 replies; 10+ messages in thread
From: David Binderman @ 2024-09-30 13:49 UTC (permalink / raw)
  To: jagathjog1996@gmail.com, jic23@kernel.org, lars@metafoo.de,
	linux-iio@vger.kernel.org, Linux Kernel Mailing List

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 ?

Regards

David Binderman

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-09-30 20:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 13:49 linux-6.12-rc1/drivers/iio/imu/bmi323/bmi323_core.c:133: Array contents defined but not used ? David Binderman
2024-09-30 13:58 ` Javier Carrasco
2024-09-30 14:04   ` Javier Carrasco
2024-09-30 15:15   ` Nathan Chancellor
2024-09-30 16:50     ` Javier Carrasco
2024-09-30 20:26       ` Nathan Chancellor
2024-09-30 20:46         ` Javier Carrasco
2024-09-30 14:19 ` Lars-Peter Clausen
2024-09-30 14:47   ` Jonathan Cameron
2024-09-30 14:47   ` Denis Benato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox