parport/parport_pc: replace
Subsystems (2)
PATCH 1/1 parport/parport_pc: replace
I would appreciate any comments from the janitors list. This is one (of many) cases where I made a decision about replacing
set_current_state(TASK_INTERRUPTIBLE);schedule_timeout(some_time);
with
msleep(jiffies_to_msecs(some_time));
msleep() is not exactly the same as the previous code, but I only did this replacement where I thought long delays were *desired*. If this is not the case here, then just disregard this patch.
Thanks,
Nish
Applys-to: 2.6.7
Description: Uses msleep() instead of schedule_timeout() to guarantee the task delays the desired time.
drivers/parport/parport_pc.c +1 -2
@@ -168,8 +168,7 @@ static int change_mode(struct parport *pif (time_after_eq (jiffies, expire))/* The FIFO is stuck. */ return -EBUSY ; -__set_current_state (TASK_INTERRUPTIBLE ); -schedule_timeout ((HZ +99 ) /100 ); +msleep (10 );if (signal_pending (current))break ; }
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
Re: [Kernel-janitors] [PATCH] parport/parport_pc:
Quoted 29 lines · Nishanth Aravamudan
I would appreciate any comments from the janitors list. This is one (of many) cases where I made a decision about replacing
set_current_state(TASK_INTERRUPTIBLE);schedule_timeout(some_time);with
msleep(jiffies_to_msecs(some_time));
msleep()is not exactly the same as the previous code, but I only did this replacement where I thought long delays were *desired*. If this is not the case here, then just disregard this patch.Thanks,
NishApplys-to: 2.6.7
Description: Uses
msleep()instead ofschedule_timeout()to guarantee the task delays the desired time.Signed-off-by Nishanth Aravamudan <[email protected]>
drivers/parport/parport_pc.c static int change_mode(struct parport *p · line 174
Quoted 9 lines
drivers/parport/parport_pc.c +1
-2@@ -168,8 +168,7 @@ static int change_mode(struct parport *pif (time_after_eq (jiffies, expire))/* The FIFO is stuck. */ return -EBUSY ; -__set_current_state (TASK_INTERRUPTIBLE ); -schedule_timeout ((HZ +99 ) /100 ); +msleep (10 );if (signal_pending (current))break ; }
Wouldn't the check of signal_pending indicate that the interruptability was intentional?
Signature · 2 lines
-------------------------- Mark Hollomon
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
You are very right, Mark. I had tried to catch these misses on my part as I was submitting but must have looked right past this one. This patch should not be applied.
-Nish
Quoted 45 lines · Mark Hollomon
Quoted 29 lines · Nishanth Aravamudan
I would appreciate any comments from the janitors list. This is one (of many) cases where I made a decision about replacing
set_current_state(TASK_INTERRUPTIBLE);schedule_timeout(some_time);with
msleep(jiffies_to_msecs(some_time));
msleep()is not exactly the same as the previous code, but I only did this replacement where I thought long delays were *desired*. If this is not the case here, then just disregard this patch.Thanks,
NishApplys-to: 2.6.7
Description: Uses
msleep()instead ofschedule_timeout()to guarantee the task delays the desired time.Signed-off-by Nishanth Aravamudan <[email protected]>drivers/parport/parport_pc.c 2004-07-12 22:09:32.000000000 +0000 static int change_mode(struct parport *p · line 174
Quoted 9 lines
drivers/parport/parport_pc.c 2004-07-12 22:09:32.000000000 +0000 renamed from drivers/parport/parport_pc.c 2004-06-16 05:20:04.000000000 +0000 +1
-2@@ -168,8 +168,7 @@ static int change_mode(struct parport *p if (time_after_eq (jiffies, expire)) /* The FIFO is stuck. */ return -EBUSY; - __set_current_state (TASK_INTERRUPTIBLE); - schedule_timeout ((HZ + 99) / 100); + msleep(10); if (signal_pending (current)) break; }Wouldn't the check of
signal_pendingindicate that the interruptability was intentional?
Quoted 6 lines
--
--------------------------
Mark Hollomon
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors