lkml.org 
[lkml]   [2004]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] use new msleep() in ADT746x driver
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


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.147 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site