Commit 7b7a4efe authored by Fabio Estevam's avatar Fabio Estevam Committed by Jonathan Cameron

iio: mxs-lradc: indexes are unsigned

Fix the following warning when building with W=1 option:

drivers/staging/iio/adc/mxs-lradc.c: In function 'mxs_lradc_trigger_handler':
drivers/staging/iio/adc/mxs-lradc.c:244:2: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 678fb42e
...@@ -239,7 +239,7 @@ static irqreturn_t mxs_lradc_trigger_handler(int irq, void *p) ...@@ -239,7 +239,7 @@ static irqreturn_t mxs_lradc_trigger_handler(int irq, void *p)
struct mxs_lradc *lradc = iio_priv(iio); struct mxs_lradc *lradc = iio_priv(iio);
const uint32_t chan_value = LRADC_CH_ACCUMULATE | const uint32_t chan_value = LRADC_CH_ACCUMULATE |
((LRADC_DELAY_TIMER_LOOP - 1) << LRADC_CH_NUM_SAMPLES_OFFSET); ((LRADC_DELAY_TIMER_LOOP - 1) << LRADC_CH_NUM_SAMPLES_OFFSET);
int i, j = 0; unsigned int i, j = 0;
for_each_set_bit(i, iio->active_scan_mask, iio->masklength) { for_each_set_bit(i, iio->active_scan_mask, iio->masklength) {
lradc->buffer[j] = readl(lradc->base + LRADC_CH(j)); lradc->buffer[j] = readl(lradc->base + LRADC_CH(j));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment