Message ID | 20200717165538.3275050-2-lee.jones@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Second batch of W=1 fixes for IIO | expand |
On Fri, 17 Jul 2020 17:55:09 +0100 Lee Jones <lee.jones@linaro.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@ti.com> > Signed-off-by: Lee Jones <lee.jones@linaro.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; > }
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; }
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: Lee Jones <lee.jones@linaro.org> --- drivers/iio/adc/ti_am335x_adc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)