lkml.org 
[lkml]   [2018]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 05/11] staging: iio: adc: ad7606: Add support for threaded irq
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

\
 
 \ /
  Last update: 2018-12-13 14:30    [W:0.128 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site