From: Brian Masney <masneyb@onstation.org>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Tom Rix <trix@redhat.com>,
lars@metafoo.de, nathan@kernel.org, ndesaulniers@google.com,
u.kleine-koenig@pengutronix.de, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
Chuhong Yuan <hslester96@gmail.com>,
Brian Masney <bmasney@redhat.com>
Subject: Re: [PATCH] iio: tsl2772: remove unused prox_diode_mask variable
Date: Sat, 1 Apr 2023 16:23:32 -0400 [thread overview]
Message-ID: <ZCiSxK5JgY6g+0X+@onstation.org> (raw)
In-Reply-To: <20230401152028.30344b48@jic23-huawei>
On Sat, Apr 01, 2023 at 03:20:28PM +0100, Jonathan Cameron wrote:
> On Mon, 27 Mar 2023 16:07:48 +0300
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>
> > On Mon, Mar 27, 2023 at 08:08:23AM -0400, Tom Rix wrote:
> > > clang with W=1 reports
> > > drivers/iio/light/tsl2772.c:576:24: error: variable
> > > 'prox_diode_mask' set but not used [-Werror,-Wunused-but-set-variable]
> > > int i, ret, num_leds, prox_diode_mask;
> > > ^
> > > This variable is not used so remove it.
> >
> > While from the compilation point of view this is a correct fix, I think
> > we need to hear from the author (or interested stakeholders) about this
> > feature. Perhaps it should be enabled / fixed differently.
> >
>
> Superficially it looks like this value should have been stored to
> chip->settings.prox_diode
>
> +CC people who might know...
Jonathan is correct about the proper fix and is this is my mistake. We
should just need to add this to the bottom of that function:
chip->settings.prox_diode = prox_diode_mask;
Tom: I can fix this up next week, unless I hear from you otherwise that
you'll do it.
Brian
prev parent reply other threads:[~2023-04-01 20:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-27 12:08 [PATCH] iio: tsl2772: remove unused prox_diode_mask variable Tom Rix
2023-03-27 13:07 ` Andy Shevchenko
2023-04-01 14:20 ` Jonathan Cameron
2023-04-01 20:23 ` Brian Masney [this message]
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=ZCiSxK5JgY6g+0X+@onstation.org \
--to=masneyb@onstation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bmasney@redhat.com \
--cc=hslester96@gmail.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=trix@redhat.com \
--cc=u.kleine-koenig@pengutronix.de \
/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