All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] use new msleep() in ADT746x driver
Date: Wed, 02 Jun 2004 16:22:36 -0400	[thread overview]
Message-ID: <40BE370C.9010800@pobox.com> (raw)
In-Reply-To: <1085873203.2140.21.camel@gaston>

Benjamin Herrenschmidt wrote:
> On Sun, 2004-05-30 at 05:54, Jeff Garzik wrote:
> 
>>Linux Kernel Mailing List wrote:
>>
>>>diff -Nru a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
>>>--- a/drivers/macintosh/therm_adt746x.c	2004-05-29 12:08:19 -07:00
>>>+++ b/drivers/macintosh/therm_adt746x.c	2004-05-29 12:08:19 -07:00
>>>@@ -246,8 +246,7 @@
>>> 
>>> 	while(monitor_running)
>>> 	{
>>>-		set_task_state(current, TASK_UNINTERRUPTIBLE);
>>>-		schedule_timeout(2*HZ);
>>>+		msleep(2000);
>>
>>
>>IMO this is moving the code away from what the coder appeared to intend.
>>
>>A "sleep(2)" would be preferred, and more clear.
> 
> 
> This patch was done by the original author of the driver


Well, I think the author is making his driver less readable...  "2 
seconds" is more clear than "2000 msec", and I am willing to bet that 
sleep() would have been used, had it existed.

	Jeff



  reply	other threads:[~2004-06-02 20:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200405291908.i4TJ8Acm011281@hera.kernel.org>
2004-05-29 19:54 ` [PATCH] use new msleep() in ADT746x driver Jeff Garzik
2004-05-29 23:26   ` Benjamin Herrenschmidt
2004-06-02 20:22     ` Jeff Garzik [this message]
2004-05-28  9:23 Benjamin Herrenschmidt

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=40BE370C.9010800@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --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.