From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: David Binderman <dcb314@hotmail.com>,
"jagathjog1996@gmail.com" <jagathjog1996@gmail.com>,
"jic23@kernel.org" <jic23@kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: linux-6.12-rc1/drivers/iio/imu/bmi323/bmi323_core.c:133: Array contents defined but not used ?
Date: Mon, 30 Sep 2024 15:47:14 +0100 [thread overview]
Message-ID: <20240930154714.00000f5c@Huawei.com> (raw)
In-Reply-To: <14a21c87-22f9-4637-b663-bb0a28fe8e46@metafoo.de>
On Mon, 30 Sep 2024 07:19:14 -0700
Lars-Peter Clausen <lars@metafoo.de> 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
next prev parent reply other threads:[~2024-09-30 14:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2024-09-30 14:47 ` Denis Benato
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=20240930154714.00000f5c@Huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=dcb314@hotmail.com \
--cc=jagathjog1996@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.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