From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] Re: [PATCH] drivers/cdrom/mcdx.c: replace
Date: Wed, 26 Oct 2005 19:48:27 +0000 [thread overview]
Message-ID: <20051026194827.GD27205@us.ibm.com> (raw)
In-Reply-To: <20051026191842.GA9416@mipter.zuzino.mipt.ru>
[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]
On 26.10.2005 [23:18:42 +0400], Alexey Dobriyan wrote:
> On Sat, Oct 22, 2005 at 09:59:18PM -0500, irwan.djajadi@iname.com wrote:
> > drivers/cdrom/mcdx.c: replace interruptible_sleep_on() with
> > wait_event_interruptible() and schedule_timeout_interruptible(). Removed
> > sleepq wait_queue, since it's no longer needed. Reordered some conditional
> > prints because wait_event_interruptible_timeout() returns -ERESTARTSYS when
> > interrupted by a signal.
>
> > --- 2.6.14-rc5/drivers/cdrom/mcdx.c
> > +++ mod/drivers/cdrom/mcdx.c
> > @@ -909,7 +908,7 @@ static int mcdx_talk(struct s_drive_stuf
> >
> > while (stuffp->lock) {
> > xtrace(SLEEP, "*** talk: lockq\n");
> > - interruptible_sleep_on(&stuffp->lockq);
> > + wait_event_interruptible(stuffp->lockq, !stuffp->lock);
> > xtrace(SLEEP, "talk: awoken\n");
> > }
>
> > @@ -1335,7 +1333,7 @@ static int mcdx_xfer(struct s_drive_stuf
> > }
> >
> > while (stuffp->lock) {
> > - interruptible_sleep_on(&stuffp->lockq);
> > + wait_event_interruptible(stuffp->lockq, !stuffp->lock);
> > }
>
> Looks like the whole loops should be replaced.
> wait_event_interruptible() does it's own looping.
That seems fine for the second replacement, but the first will lose
per-iteration tracing. Depends on whether the maintainer cares.
Thanks,
Nish
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
next prev parent reply other threads:[~2005-10-26 19:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-26 19:18 [KJ] Re: [PATCH] drivers/cdrom/mcdx.c: replace Alexey Dobriyan
2005-10-26 19:48 ` Nishanth Aravamudan [this message]
2005-10-27 3:56 ` irwan.djajadi
2005-10-27 19:11 ` Nishanth Aravamudan
2005-10-28 3:53 ` Irwan Djajadi
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=20051026194827.GD27205@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 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.