kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: [Kernel-janitors] Re: usb/auerswald: reorder set_current_state()
Date: Wed, 29 Sep 2004 17:22:43 +0000	[thread overview]
Message-ID: <20040929172243.GA1652@us.ibm.com> (raw)
In-Reply-To: <20040929163014.GB3599@masina.coderock.org>

[-- Attachment #1: Type: text/plain, Size: 890 bytes --]

On Wed, Sep 29, 2004 at 06:30:14PM +0200, Domen Puncer wrote:
> On 27/09/04 14:46 -0700, Nishanth Aravamudan wrote:
> > +++ 2.6.9-rc2/drivers/usb/misc/auerswald.c	2004-09-27 14:42:24.000000000 -0700
> > @@ -626,8 +626,8 @@ static int auerchain_start_wait_urb (pau
> >  
> >  	while (timeout && !chs.done)
> >  	{
> > -		timeout = schedule_timeout (timeout);
> >  		set_current_state(TASK_UNINTERRUPTIBLE);
> > +		timeout = schedule_timeout (timeout);
> >  		rmb();
> >  	}
> >
> Now "set_current_state (TASK_RUNNING);" a line under this isn't
> needed anymore, right?

I think it is still needed, because the state is initially set just before
add_wait_queue() [before the if] to TASK_UNINTERRUPTIBLE. So, in the off
chance that the while-loop's condition is false on the first iteration,
the state needs to be set back to TASK_RUNNING, since schedule_timeout()
won't be run at all.

-Nish

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

  reply	other threads:[~2004-09-29 17:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-29 16:30 [Kernel-janitors] Re: usb/auerswald: reorder set_current_state() Domen Puncer
2004-09-29 17:22 ` Nishanth Aravamudan [this message]
2004-09-29 17:42 ` Domen Puncer
2004-09-29 18:00 ` Nishanth Aravamudan
2004-09-29 22:44 ` Nishanth Aravamudan

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=20040929172243.GA1652@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=kernel-janitors@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).