[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200716135928.1456727-2-lee.jones@linaro.org>
Date: Thu, 16 Jul 2020 14:58:59 +0100
From: Lee Jones <lee.jones@...aro.org>
To: jic23@...nel.org, knaack.h@....de, lars@...afoo.de,
pmeerw@...erw.net
Cc: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-iio@...r.kernel.org, Lee Jones <lee.jones@...aro.org>,
Michael Hennerich <Michael.Hennerich@...log.com>
Subject: [PATCH 01/30] iio: adc: ad_sigma_delta: Remove unused variable 'ret'
Fixes the following W=1 kernel build warning(s):
drivers/iio/adc/ad_sigma_delta.c: In function ‘ad_sd_trigger_handler’:
drivers/iio/adc/ad_sigma_delta.c:405:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
405 | int ret;
| ^~~
Cc: Michael Hennerich <Michael.Hennerich@...log.com>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
drivers/iio/adc/ad_sigma_delta.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/iio/adc/ad_sigma_delta.c b/drivers/iio/adc/ad_sigma_delta.c
index dd3d54b3bc8bb..f269b926440da 100644
--- a/drivers/iio/adc/ad_sigma_delta.c
+++ b/drivers/iio/adc/ad_sigma_delta.c
@@ -402,7 +402,6 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
unsigned int reg_size;
unsigned int data_reg;
uint8_t data[16];
- int ret;
memset(data, 0x00, 16);
@@ -419,14 +418,12 @@ static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
case 4:
case 2:
case 1:
- ret = ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size,
- &data[0]);
+ ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size, &data[0]);
break;
case 3:
/* We store 24 bit samples in a 32 bit word. Keep the upper
* byte set to zero. */
- ret = ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size,
- &data[1]);
+ ad_sd_read_reg_raw(sigma_delta, data_reg, reg_size, &data[1]);
break;
}
--
2.25.1
Powered by blists - more mailing lists