From: Ian Abbott <abbotti@mev.co.uk>
To: Chase Southwood <chase.southwood@yahoo.com>,
Ian Abbott <ian.abbott@mev.co.uk>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "hsweeten@visionengravers.com" <hsweeten@visionengravers.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Staging: comedi: add timeouts to while loops in s626.c
Date: Mon, 3 Mar 2014 14:05:30 +0000 [thread overview]
Message-ID: <53148C2A.9000305@mev.co.uk> (raw)
In-Reply-To: <1393652927.45628.YahooMailNeo@web164006.mail.gq1.yahoo.com>
On 2014-03-01 05:48, Chase Southwood wrote:
> On Friday, February 28, 2014 11:26 AM, Ian Abbott <abbotti@mev.co.uk> wrote:
>> On 2014-02-28 07:35, Chase Southwood wrote:
>>> And finally, are timeouts here even necessary or helpful, or are there
>>> any better ways to do it?
>>
>> In the case of s626_send_dac(), it doesn't seem to be used in any
>> critical sections, so it could make use of Hartley's comedi_timeout().
>>
>> Some of the timeout errors could be propagated, especially for
>> s626_send_dac() which is only reachable from very few paths.
>>
>
> Awesome, I'll swap all of my timeouts out for comedi_timeout() in s626_send_dac().
> As for propagating the timeout errors, could you please clarify that a bit further? Both of the functions
> which I add timeouts inside of in this patch return void, and so in their current state they cannot return any error
> values. Would you like them (or at least s626_send_dac()) to instead return an error upon timeout/or success on success,
> or am I just totally misunderstanding your meaning of propagate here?
s626_send_dac() could be changed to return an int value 0 on success or
-ETIMEDOUT on timeout. s626_set_dac() and s626_write_trim_dac() could
be changed to return an int - just return the result of s626_send_dac().
Similarly, the result of those functions could be either propagated
upwards. This could all be done in a separate patch (or patches).
>> There are other infinite loops involving calls to the s626_mc_test()
>> function, but those could be dealt with by other patches.
>
> Yeah, I saw those...I'll whip up a patch for them, just wanted to verify that everything looks pretty good here
> before I started on that. I'll have that right out!
Yes, anything is an improvement on an infinite loop waiting for the
hardware to do something!
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
next prev parent reply other threads:[~2014-03-03 14:06 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-28 7:35 [PATCH] Staging: comedi: add timeouts to while loops in s626.c Chase Southwood
2014-02-28 17:18 ` Ian Abbott
2014-03-01 5:48 ` Chase Southwood
2014-03-02 4:13 ` Chase Southwood
2014-03-03 14:13 ` Ian Abbott
2014-03-04 4:06 ` Chase Southwood
2014-03-03 14:05 ` Ian Abbott [this message]
2014-03-04 8:43 ` [PATCH v2 1/2] Staging: comedi: convert while loops to timeouts " Chase Southwood
2014-03-05 12:09 ` Ian Abbott
2014-03-06 8:13 ` Chase Southwood
2014-03-08 1:43 ` [PATCH v3 1/2] Staging: comedi: convert while loops to timeouts in Chase Southwood
2014-03-09 3:00 ` Greg KH
2014-03-09 3:55 ` Chase Southwood
2014-03-09 4:00 ` [PATCH v3 1/2] Staging: comedi: convert while loops to timeouts in s626.c Chase Southwood
2014-03-11 14:26 ` Ian Abbott
2014-03-15 1:43 ` Chase Southwood
2014-03-15 5:26 ` gregkh
2014-03-15 7:18 ` Chase Southwood
2014-03-08 1:43 ` [PATCH v3 2/2] Staging: comedi: propagate timeout errors " Chase Southwood
2014-03-11 14:27 ` Ian Abbott
2014-03-04 8:44 ` [PATCH v2 " Chase Southwood
2014-03-05 12:11 ` Ian Abbott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53148C2A.9000305@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=chase.southwood@yahoo.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=ian.abbott@mev.co.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.