[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200718163058.672b6362@archlinux>
Date: Sat, 18 Jul 2020 16:30:58 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Lee Jones <lee.jones@...aro.org>
Cc: knaack.h@....de, lars@...afoo.de, pmeerw@...erw.net,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-iio@...r.kernel.org, Rachna Patil <rachna@...com>
Subject: Re: [PATCH 01/30] iio: adc: ti_am335x_adc: Remove a couple of
unused 'read' variables
On Fri, 17 Jul 2020 17:55:09 +0100
Lee Jones <lee.jones@...aro.org> wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/iio/adc/ti_am335x_adc.c: In function ‘tiadc_buffer_preenable’:
> drivers/iio/adc/ti_am335x_adc.c:297:21: warning: variable ‘read’ set but not used [-Wunused-but-set-variable]
> 297 | int i, fifo1count, read;
> | ^~~~
> drivers/iio/adc/ti_am335x_adc.c: In function ‘tiadc_buffer_predisable’:
> drivers/iio/adc/ti_am335x_adc.c:346:21: warning: variable ‘read’ set but not used [-Wunused-but-set-variable]
> 346 | int fifo1count, i, read;
> | ^~~~
>
> Cc: Rachna Patil <rachna@...com>
> Signed-off-by: Lee Jones <lee.jones@...aro.org>
Applied to the togreg branch of iio.git which will get pushed out as testing for
the autobuilders to poke at these changes.
Still time or anyone one else to comment. I'm picking these up as they are
all noops and appear straight forward.
Thanks,
Jonathan
> ---
> drivers/iio/adc/ti_am335x_adc.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c
> index 9d984f2a8ba74..93b67bb165044 100644
> --- a/drivers/iio/adc/ti_am335x_adc.c
> +++ b/drivers/iio/adc/ti_am335x_adc.c
> @@ -294,7 +294,7 @@ static int tiadc_start_dma(struct iio_dev *indio_dev)
> static int tiadc_buffer_preenable(struct iio_dev *indio_dev)
> {
> struct tiadc_device *adc_dev = iio_priv(indio_dev);
> - int i, fifo1count, read;
> + int i, fifo1count;
>
> tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES |
> IRQENB_FIFO1OVRRUN |
> @@ -303,7 +303,7 @@ static int tiadc_buffer_preenable(struct iio_dev *indio_dev)
> /* Flush FIFO. Needed in corner cases in simultaneous tsc/adc use */
> fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT);
> for (i = 0; i < fifo1count; i++)
> - read = tiadc_readl(adc_dev, REG_FIFO1);
> + tiadc_readl(adc_dev, REG_FIFO1);
>
> return 0;
> }
> @@ -343,7 +343,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev)
> {
> struct tiadc_device *adc_dev = iio_priv(indio_dev);
> struct tiadc_dma *dma = &adc_dev->dma;
> - int fifo1count, i, read;
> + int fifo1count, i;
>
> tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES |
> IRQENB_FIFO1OVRRUN | IRQENB_FIFO1UNDRFLW));
> @@ -358,7 +358,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev)
> /* Flush FIFO of leftover data in the time it takes to disable adc */
> fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT);
> for (i = 0; i < fifo1count; i++)
> - read = tiadc_readl(adc_dev, REG_FIFO1);
> + tiadc_readl(adc_dev, REG_FIFO1);
>
> return 0;
> }
Powered by blists - more mailing lists