[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240328112211.761618-1-colin.i.king@gmail.com>
Date: Thu, 28 Mar 2024 11:22:11 +0000
From: Colin Ian King <colin.i.king@...il.com>
To: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Cosmin Tanislav <cosmin.tanislav@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
linux-iio@...r.kernel.org
Cc: kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH][next] iio: addac: ad74115: remove redundant if statement
The if statement is redundant because the variable i being
assigned in the statement is never read afterwards. Remove it.
Cleans up clang scan build warning:
drivers/iio/addac/ad74115.c:570:3: warning: Value stored to 'i'
is never read [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@...il.com>
---
drivers/iio/addac/ad74115.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/iio/addac/ad74115.c b/drivers/iio/addac/ad74115.c
index e6bc5eb3788d..d31d4adb017e 100644
--- a/drivers/iio/addac/ad74115.c
+++ b/drivers/iio/addac/ad74115.c
@@ -566,9 +566,6 @@ static int ad74115_set_comp_debounce(struct ad74115_state *st, unsigned int val)
if (val <= ad74115_debounce_tbl[i])
break;
- if (i == len)
- i = len - 1;
-
return regmap_update_bits(st->regmap, AD74115_DIN_CONFIG1_REG,
AD74115_DIN_DEBOUNCE_MASK,
FIELD_PREP(AD74115_DIN_DEBOUNCE_MASK, val));
--
2.39.2
Powered by blists - more mailing lists