From: "Dmitry Torokhov" <dmitry.torokhov@gmail.com>
To: "Zed 0xff" <zed.0xff@gmail.com>
Cc: kernel-janitors@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [patch] fix common mistake in polling loops
Date: Fri, 28 Jul 2006 08:43:00 -0400 [thread overview]
Message-ID: <d120d5000607280543u6ca61a7epbb26ef98dafcae18@mail.gmail.com> (raw)
In-Reply-To: <710c0ee0607280128g2d968c49ycff3bac9e073e7fa@mail.gmail.com>
On 7/28/06, Zed 0xff <zed.0xff@gmail.com> wrote:
> @@ -955,11 +956,15 @@ static void psmouse_resync(void *p)
> * repeat our attempts 5 times, otherwise we may be left out with disabled
> * mouse.
> */
> - for (i = 0; i < 5; i++) {
> + timeout = jiffies + msecs_to_jiffies(1000);
> + for (;;) {
> if (!ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_ENABLE)) {
> enabled = 1;
> break;
> }
> + if (time_after(timeout, jiffies)) {
> + break;
> + }
> msleep(200);
> }
>
NAK. Have you read the comment above (that is partially visible in
your diff)? I do not really care about timeout here, I want my mouse
working.
--
Dmitry
next prev parent reply other threads:[~2006-07-28 12:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-28 8:28 Zed 0xff
2006-07-28 8:51 ` Jeff Garzik
2006-07-28 12:43 ` Dmitry Torokhov [this message]
2006-08-05 11:40 ` Pavel Machek
2006-08-05 11:45 ` Pavel Machek
2006-08-06 23:39 ` [KJ] " Darren Jenkins
2006-08-07 23:34 ` Pavel Machek
2006-08-08 0:53 ` Darren Jenkins
2006-08-08 2:53 ` Om N.
2006-08-10 0:25 ` Andrew James Wade
2006-08-10 1:11 ` Darren Jenkins
2006-08-08 9:19 ` Pavel Machek
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=d120d5000607280543u6ca61a7epbb26ef98dafcae18@mail.gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=kernel-janitors@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zed.0xff@gmail.com \
/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
Powered by JetHome