linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] io: adc: ad7606_core: fix signed/unsigned number comparison
@ 2016-09-28 13:41 Ico Doornekamp
  2016-10-01 16:09 ` Jonathan Cameron
  0 siblings, 1 reply; 5+ messages in thread
From: Ico Doornekamp @ 2016-09-28 13:41 UTC (permalink / raw)
  To: jic23; +Cc: linux-iio, Ico Doornekamp

reported by 'make W=2' in ad7606_oversampling_get_index()

Signed-off-by: Ico Doornekamp <ico@pruts.nl>
---
 drivers/staging/iio/adc/ad7606_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c
index f79ee61..681389a 100644
--- a/drivers/staging/iio/adc/ad7606_core.c
+++ b/drivers/staging/iio/adc/ad7606_core.c
@@ -158,7 +158,7 @@ static ssize_t ad7606_show_oversampling_ratio(struct device *dev,
 static int ad7606_oversampling_get_index(unsigned int val)
 {
 	unsigned char supported[] = {0, 2, 4, 8, 16, 32, 64};
-	int i;
+	unsigned int i;
 
 	for (i = 0; i < ARRAY_SIZE(supported); i++)
 		if (val == supported[i])
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-01 17:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-28 13:41 [PATCH] io: adc: ad7606_core: fix signed/unsigned number comparison Ico Doornekamp
2016-10-01 16:09 ` Jonathan Cameron
2016-10-01 16:17   ` Ico Doornekamp
2016-10-01 16:49     ` Alison Schofield
2016-10-01 17:27       ` Ico Doornekamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).