Re: [PATCH 07/13] staging:iio:ad7606: Factor out common code between periodic and one-shot capture

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

 



On 22/10/16 18:20, Lars-Peter Clausen wrote:
> On 10/22/2016 07:02 PM, Jonathan Cameron wrote:
> [...]
>>> +	ret = ad7606_read_samples(st);
>> I personally always slightly prefer the 'good' path to not be out of the
>> 'direct' flow.
>>
>> Still minor point and I don't care that much!
> 
> Somewhat agreed, but if I did
> 
> 	if (ret)
> 		goto done;
> 	iio_push_to_buffers_with_timestamp(...)
> 
> 	done:
> 
> It would probably be 5 minutes until somebody sends a cocci generated patch
> to 'fix' this ;)
I'm good at ignoring those ones ;)

J
> 
>>> +	if (ret == 0)
>>> +		iio_push_to_buffers_with_timestamp(indio_dev, st->data,
>>> +						   iio_get_time_ns(indio_dev));
>>>  
>>> -	iio_push_to_buffers_with_timestamp(indio_dev, st->data,
>>> -					   iio_get_time_ns(indio_dev));
>>> -done:
>>>  	gpio_set_value(st->pdata->gpio_convst, 0);
>>>  	iio_trigger_notify_done(indio_dev->trig);
>>>  }
>>>
>>
> 
> --
> 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
> 

--
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