Commit f83d87a0 authored by Lee Jones's avatar Lee Jones Committed by Jonathan Cameron

iio: adc: ti_am335x_adc: Remove a couple of unused 'read' variables

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@ti.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 0d674449
...@@ -294,7 +294,7 @@ static int tiadc_start_dma(struct iio_dev *indio_dev) ...@@ -294,7 +294,7 @@ static int tiadc_start_dma(struct iio_dev *indio_dev)
static int tiadc_buffer_preenable(struct iio_dev *indio_dev) static int tiadc_buffer_preenable(struct iio_dev *indio_dev)
{ {
struct tiadc_device *adc_dev = iio_priv(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 | tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES |
IRQENB_FIFO1OVRRUN | IRQENB_FIFO1OVRRUN |
...@@ -303,7 +303,7 @@ static int tiadc_buffer_preenable(struct iio_dev *indio_dev) ...@@ -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 */ /* Flush FIFO. Needed in corner cases in simultaneous tsc/adc use */
fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT); fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT);
for (i = 0; i < fifo1count; i++) for (i = 0; i < fifo1count; i++)
read = tiadc_readl(adc_dev, REG_FIFO1); tiadc_readl(adc_dev, REG_FIFO1);
return 0; return 0;
} }
...@@ -343,7 +343,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev) ...@@ -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_device *adc_dev = iio_priv(indio_dev);
struct tiadc_dma *dma = &adc_dev->dma; struct tiadc_dma *dma = &adc_dev->dma;
int fifo1count, i, read; int fifo1count, i;
tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES | tiadc_writel(adc_dev, REG_IRQCLR, (IRQENB_FIFO1THRES |
IRQENB_FIFO1OVRRUN | IRQENB_FIFO1UNDRFLW)); IRQENB_FIFO1OVRRUN | IRQENB_FIFO1UNDRFLW));
...@@ -358,7 +358,7 @@ static int tiadc_buffer_predisable(struct iio_dev *indio_dev) ...@@ -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 */ /* Flush FIFO of leftover data in the time it takes to disable adc */
fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT); fifo1count = tiadc_readl(adc_dev, REG_FIFO1CNT);
for (i = 0; i < fifo1count; i++) for (i = 0; i < fifo1count; i++)
read = tiadc_readl(adc_dev, REG_FIFO1); tiadc_readl(adc_dev, REG_FIFO1);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment