diff mbox series

[02/30] iio: adc: twl4030-madc: Remove set but unused variables 'len'

Message ID 20200717165538.3275050-3-lee.jones@linaro.org (mailing list archive)
State New, archived
Headers show
Series Second batch of W=1 fixes for IIO | expand

Commit Message

Lee Jones July 17, 2020, 4:55 p.m. UTC
Fixes the following W=1 kernel build warning(s):

 drivers/iio/adc/twl4030-madc.c: In function ‘twl4030_madc_threaded_irq_handler’:
 drivers/iio/adc/twl4030-madc.c:475:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
 475 | int i, len, ret;
 | ^~~

Cc: Sebastian Reichel <sre@kernel.org>
Cc: J Keerthy <j-keerthy@ti.com>
Cc: Mikko Ylinen <mikko.k.ylinen@nokia.com>
Cc: Amit Kucheria <amit.kucheria@canonical.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/iio/adc/twl4030-madc.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Jonathan Cameron July 18, 2020, 3:32 p.m. UTC | #1
On Fri, 17 Jul 2020 17:55:10 +0100
Lee Jones <lee.jones@linaro.org> wrote:

> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/iio/adc/twl4030-madc.c: In function ‘twl4030_madc_threaded_irq_handler’:
>  drivers/iio/adc/twl4030-madc.c:475:9: warning: variable ‘len’ set but not used [-Wunused-but-set-variable]
>  475 | int i, len, ret;
>  | ^~~
> 
> Cc: Sebastian Reichel <sre@kernel.org>
> Cc: J Keerthy <j-keerthy@ti.com>
> Cc: Mikko Ylinen <mikko.k.ylinen@nokia.com>
> Cc: Amit Kucheria <amit.kucheria@canonical.com>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Applied to the togreg branch of iio.git and pushed out as testing or the autobuilders
to play with them.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/twl4030-madc.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c
> index 472b08f37feae..826d8295e9b3c 100644
> --- a/drivers/iio/adc/twl4030-madc.c
> +++ b/drivers/iio/adc/twl4030-madc.c
> @@ -472,7 +472,7 @@ static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)
>  	struct twl4030_madc_data *madc = _madc;
>  	const struct twl4030_madc_conversion_method *method;
>  	u8 isr_val, imr_val;
> -	int i, len, ret;
> +	int i, ret;
>  	struct twl4030_madc_request *r;
>  
>  	mutex_lock(&madc->lock);
> @@ -504,8 +504,8 @@ static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)
>  			continue;
>  		method = &twl4030_conversion_methods[r->method];
>  		/* Read results */
> -		len = twl4030_madc_read_channels(madc, method->rbase,
> -						 r->channels, r->rbuf, r->raw);
> +		twl4030_madc_read_channels(madc, method->rbase,
> +					   r->channels, r->rbuf, r->raw);
>  		/* Free request */
>  		r->result_pending = false;
>  		r->active = false;
> @@ -525,8 +525,8 @@ static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)
>  			continue;
>  		method = &twl4030_conversion_methods[r->method];
>  		/* Read results */
> -		len = twl4030_madc_read_channels(madc, method->rbase,
> -						 r->channels, r->rbuf, r->raw);
> +		twl4030_madc_read_channels(madc, method->rbase,
> +					   r->channels, r->rbuf, r->raw);
>  		/* Free request */
>  		r->result_pending = false;
>  		r->active = false;
diff mbox series

Patch

diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c
index 472b08f37feae..826d8295e9b3c 100644
--- a/drivers/iio/adc/twl4030-madc.c
+++ b/drivers/iio/adc/twl4030-madc.c
@@ -472,7 +472,7 @@  static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)
 	struct twl4030_madc_data *madc = _madc;
 	const struct twl4030_madc_conversion_method *method;
 	u8 isr_val, imr_val;
-	int i, len, ret;
+	int i, ret;
 	struct twl4030_madc_request *r;
 
 	mutex_lock(&madc->lock);
@@ -504,8 +504,8 @@  static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)
 			continue;
 		method = &twl4030_conversion_methods[r->method];
 		/* Read results */
-		len = twl4030_madc_read_channels(madc, method->rbase,
-						 r->channels, r->rbuf, r->raw);
+		twl4030_madc_read_channels(madc, method->rbase,
+					   r->channels, r->rbuf, r->raw);
 		/* Free request */
 		r->result_pending = false;
 		r->active = false;
@@ -525,8 +525,8 @@  static irqreturn_t twl4030_madc_threaded_irq_handler(int irq, void *_madc)
 			continue;
 		method = &twl4030_conversion_methods[r->method];
 		/* Read results */
-		len = twl4030_madc_read_channels(madc, method->rbase,
-						 r->channels, r->rbuf, r->raw);
+		twl4030_madc_read_channels(madc, method->rbase,
+					   r->channels, r->rbuf, r->raw);
 		/* Free request */
 		r->result_pending = false;
 		r->active = false;