mtd/cfi_cmdset_0002:
Subsystems (5)
PATCH 3/4 mtd/cfi_cmdset_0002:
Any comments would be appreciated.
Description: Use msleep() instead of schedule_timeout() to guarantee the task delays as expected.
drivers/mtd/chips/cfi_cmdset_0002.c +2 -4
@@ -1175,8 +1175,7 @@ static inline int do_erase_chip(struct m chip->in_progress_block_addr = adr;cfi_spin_unlock (chip->mutex); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout ((chip->erase_time*HZ )/(2 *1000 )); +msleep (chip->erase_time/2 );cfi_spin_lock (chip->mutex); timeo = jiffies + (HZ *20 );
@@ -1354,8 +1353,7 @@ static inline int do_erase_oneblock(stru chip->in_progress_block_addr = adr;cfi_spin_unlock (chip->mutex); -set_current_state (TASK_UNINTERRUPTIBLE ); -schedule_timeout ((chip->erase_time*HZ )/(2 *1000 )); +msleep (chip->erase_time/2 );cfi_spin_lock (chip->mutex); timeo = jiffies + (HZ *20 );
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
PATCH 3/4 pci hotplug/pciehp: replace
Any comments would be appreciated.
Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected.
drivers/pci/hotplug/pciehp.h +5 -6
@@ -31,6 +31,7 @@#include <linux/types.h> #include <linux/pci.h> +#include <linux/delay.h> #include <asm/semaphore.h> #include <asm/io.h> #include "pci_hotplug.h"
@@ -261,14 +262,12 @@ static inline int wait_for_ctrl_irq(strudbg ("%s : start\n" , __FUNCTION__);add_wait_queue (&ctrl->queue, &wait); -set_current_state (TASK_INTERRUPTIBLE ); -if (!pciehp_poll_mode) { +if (!pciehp_poll_mode)/* Sleep for up to 1 second */ -schedule_timeout (1 *HZ ); - }else -schedule_timeout (2.5 *HZ ); +msleep_interruptible (1000 ); +else +msleep_interruptible (2500 ); -set_current_state (TASK_RUNNING );remove_wait_queue (&ctrl->queue, &wait);if (signal_pending (current)) retval = -EINTR ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
PATCH 3/4 sbus/bbc_i2c: replace
In reply to Nishanth AravamudanAny comments would be appreciated.
Description: Use msleep_interruptible() instead of schedule_timeout() to guarantee the task delays as expected. Also use set_current_state() instead of direct assignment of current->state.
drivers/sbus/char/bbc_i2c.c +2 -2
@@ -189,13 +189,13 @@ static int wait_for_pin(struct bbc_i2c_bwhile (limit-- >0 ) {u8 val; - current->state =TASK_INTERRUPTIBLE ; +set_current_state (TASK_INTERRUPTIBLE ); *status = val =readb (bp->i2c_control_regs +0 );if ((val &I2C_PCF_PIN ) ==0 ) { ret =0 ;break ; } -schedule_timeout (HZ /4 ); +msleep_interruptible (250 ); }remove_wait_queue (&bp->wq, &wait); bp->waiting =0 ;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
PATCH 3/4 w1/w1_int: add
In reply to Nishanth AravamudanAny comments would be appreciated.
Description: Inserted set_current_state() before schedule_timeout() so the task delays as expected. Without the insertion, schedule_timeout() will return immediately.
drivers/w1/w1_int.c +3 -1
@@ -179,8 +179,10 @@ void __w1_remove_master_device(struct w1"%s: Failed to send signal to w1 kernel thread %d.\n" , __func__, dev->kpid); -while (atomic_read (&dev->refcnt)) +while (atomic_read (&dev->refcnt)) { +set_current_state (TASK_INTERRUPTIBLE );schedule_timeout (10 ); + } msg.id.mst.id = dev->id; msg.id.mst.pid = dev->kpid;
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors