From: Jeff Garzik <jeff@garzik.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] CDROM: replace jiffies busyloop with msleep
Date: Tue, 22 May 2007 06:30:24 -0400 [thread overview]
Message-ID: <4652C640.3090806@garzik.org> (raw)
In-Reply-To: <1179829525.12708.118.camel@chaos>
Thomas Gleixner wrote:
> From: Ingo Molnar <mingo@elte.hu>
>
> The SJCD driver uses a jiffies busy loop. Replace it with msleep.
>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> Acked-by: Thomas Gleixner <tglx@linutronix.de>
>
> ---
> drivers/cdrom/sjcd.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-2.6/drivers/cdrom/sjcd.c
> ===================================================================
> --- linux-2.6.orig/drivers/cdrom/sjcd.c
> +++ linux-2.6/drivers/cdrom/sjcd.c
> @@ -69,6 +69,7 @@
> #include <linux/string.h>
> #include <linux/major.h>
> #include <linux/init.h>
> +#include <linux/delay.h>
>
> #include <asm/system.h>
> #include <asm/io.h>
> @@ -1709,12 +1710,11 @@ static int __init sjcd_init(void)
> printk(KERN_INFO "SJCD: Resetting: ");
> sjcd_send_cmd(SCMD_RESET);
> for (i = 1000; i > 0 && !sjcd_status_valid; --i) {
> - unsigned long timer;
> -
> /*
> * Wait 10ms approx.
> */
> - for (timer = jiffies; time_before_eq(jiffies, timer););
> + msleep(10);
> +
I always worry when I see code like this, wondering if there is some
arcane reason that I cannot fathom, that is being removed. You gotta
wonder how long it has been since this driver was used, by anybody.
Oh well, I cannot find fault with the patch, paranoia worries aside.
ACK.
Jeff
next prev parent reply other threads:[~2007-05-22 10:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-22 10:25 Thomas Gleixner
2007-05-22 10:30 ` Jeff Garzik [this message]
2007-05-22 11:21 ` Ingo Molnar
2007-05-22 11:20 ` Jens Axboe
2007-05-23 18:41 ` Rene Herman
2007-05-23 19:28 ` Ingo Molnar
2007-05-23 19:37 ` Rene Herman
2007-05-23 19:34 ` Alan Cox
2007-05-23 19:38 ` Rene Herman
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=4652C640.3090806@garzik.org \
--to=jeff@garzik.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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