Re: [PATCH 05/11] staging: iio: adc: ad7606: Add support for threaded irq

From: Dan Carpenter
Date: Thu Dec 13 2018 - 08:29:51 EST


On Thu, Dec 13, 2018 at 02:46:17PM +0200, Stefan Popa wrote:
> +static int ad7606_buffer_predisable(struct iio_dev *indio_dev)
> +{
> + struct ad7606_state *st = iio_priv(indio_dev);
> + int ret;
> +
> + reinit_completion(&st->completion);
> + gpiod_set_value(st->gpio_convst, 1);
> + ret = wait_for_completion_timeout(&st->completion,
> + msecs_to_jiffies(1000));

We don't use this "ret". It will introduce a set but not used warning
on new GCCs or static checkers or something.

> + gpiod_set_value(st->gpio_convst, 0);
> +
> + return iio_triggered_buffer_predisable(indio_dev);
> +}

regards,
dan carpenter