[PATCH] io: adc: ad7606_core: fix signed/unsigned number comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Ico Doornekamp <ico@xxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux