[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZCiSxK5JgY6g+0X+@onstation.org>
Date: Sat, 1 Apr 2023 16:23:32 -0400
From: Brian Masney <masneyb@...tation.org>
To: Jonathan Cameron <jic23@...nel.org>
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Tom Rix <trix@...hat.com>, lars@...afoo.de, nathan@...nel.org,
ndesaulniers@...gle.com, u.kleine-koenig@...gutronix.de,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, Chuhong Yuan <hslester96@...il.com>,
Brian Masney <bmasney@...hat.com>
Subject: Re: [PATCH] iio: tsl2772: remove unused prox_diode_mask variable
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@...ux.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
Powered by blists - more mailing lists