All of lore.kernel.org
 help / color / mirror / Atom feed
* [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] mtd/cfi_cmdset_0020:
@ 2004-09-20 23:59 Nishanth Aravamudan
  2004-09-24 23:20 ` [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] pci hotplug/shpchp: replace Nishanth Aravamudan
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2004-09-20 23:59 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

Any comments would be appreciated.

Description: Use msleep() instead of schedule_timeout()
to guarantee the task delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.9-rc1-mm4-vanilla/drivers/mtd/chips/cfi_cmdset_0020.c	2004-09-09 23:05:53.000000000 -0700
+++ 2.6.9-rc1-mm4/drivers/mtd/chips/cfi_cmdset_0020.c	2004-09-10 14:17:13.000000000 -0700
@@ -788,7 +788,7 @@ retry:
 	chip->state = FL_ERASING;
 	
 	spin_unlock_bh(chip->mutex);
-	schedule_timeout(HZ);
+	msleep(1000);
 	spin_lock_bh(chip->mutex);
 
 	/* FIXME. Use a timer to check this, and return immediately. */
@@ -1087,7 +1087,7 @@ retry:
 	chip->state = FL_LOCKING;
 	
 	spin_unlock_bh(chip->mutex);
-	schedule_timeout(HZ);
+	msleep(1000);
 	spin_lock_bh(chip->mutex);
 
 	/* FIXME. Use a timer to check this, and return immediately. */
@@ -1236,7 +1236,7 @@ retry:
 	chip->state = FL_UNLOCKING;
 	
 	spin_unlock_bh(chip->mutex);
-	schedule_timeout(HZ);
+	msleep(1000);
 	spin_lock_bh(chip->mutex);
 
 	/* FIXME. Use a timer to check this, and return immediately. */

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] pci hotplug/shpchp: replace
  2004-09-20 23:59 [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] mtd/cfi_cmdset_0020: Nishanth Aravamudan
@ 2004-09-24 23:20 ` Nishanth Aravamudan
  2004-09-27 17:28 ` [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] sbus/envctrl: replace Nishanth Aravamudan
  2004-09-27 23:20 ` [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] w1/w1: add Nishanth Aravamudan
  2 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2004-09-24 23:20 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]

Any comments would be appreciated.

Description: Use msleep_interruptible() instead of
schedule_timeout() to guarantee the task delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.9-rc2-vanilla/drivers/pci/hotplug/shpchp.h	2004-09-13 17:15:46.000000000 -0700
+++ 2.6.9-rc2/drivers/pci/hotplug/shpchp.h	2004-09-24 16:17:30.000000000 -0700
@@ -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"
@@ -381,16 +382,14 @@ static inline int wait_for_ctrl_irq (str
 	dbg("%s : start\n",__FUNCTION__);
 
 	add_wait_queue(&ctrl->queue, &wait);
-	set_current_state(TASK_INTERRUPTIBLE);
 
 	if (!shpchp_poll_mode) {
 		/* Sleep for up to 1 second */
-		schedule_timeout(1*HZ);
+		msleep_interruptible(1000);
 	} else {
 		/* Sleep for up to 2 seconds */
-		schedule_timeout(2*HZ);
+		msleep_interruptible(2000);
 	}
-	set_current_state(TASK_RUNNING);
 	remove_wait_queue(&ctrl->queue, &wait);
 	if (signal_pending(current))
 		retval =  -EINTR;

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] sbus/envctrl: replace
  2004-09-20 23:59 [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] mtd/cfi_cmdset_0020: Nishanth Aravamudan
  2004-09-24 23:20 ` [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] pci hotplug/shpchp: replace Nishanth Aravamudan
@ 2004-09-27 17:28 ` Nishanth Aravamudan
  2004-09-27 23:20 ` [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] w1/w1: add Nishanth Aravamudan
  2 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2004-09-27 17:28 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

Any comments would be appreciated.

Description: Use msleep_interruptible() instead of
schedule_timeout() to guarantee the task delays as expected.

--- 2.6.9-rc1-mm4-vanilla/drivers/sbus/char/envctrl.c	2004-09-09 23:05:59.000000000 -0700
+++ 2.6.9-rc1-mm4/drivers/sbus/char/envctrl.c	2004-09-10 15:42:50.000000000 -0700
@@ -1034,8 +1034,7 @@ static int kenvctrld(void *__unused)
 
 	printk(KERN_INFO "envctrl: %s starting...\n", current->comm);
 	for (;;) {
-		current->state = TASK_INTERRUPTIBLE;
-		schedule_timeout(poll_interval);
+		msleep_interruptible(jiffies_to_msecs(poll_interval));
 
 		if(signal_pending(current))
 			break;

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] w1/w1: add
  2004-09-20 23:59 [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] mtd/cfi_cmdset_0020: Nishanth Aravamudan
  2004-09-24 23:20 ` [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] pci hotplug/shpchp: replace Nishanth Aravamudan
  2004-09-27 17:28 ` [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] sbus/envctrl: replace Nishanth Aravamudan
@ 2004-09-27 23:20 ` Nishanth Aravamudan
  2 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2004-09-27 23:20 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

Any 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.

--- 2.6.9-rc2-vanilla/drivers/w1/w1.c	2004-09-13 17:16:07.000000000 -0700
+++ 2.6.9-rc2/drivers/w1/w1.c	2004-09-14 10:45:44.000000000 -0700
@@ -446,8 +446,10 @@ static void w1_slave_detach(struct w1_sl
 	
 	dev_info(&sl->dev, "%s: detaching %s.\n", __func__, sl->name);
 
-	while (atomic_read(&sl->refcnt))
+	while (atomic_read(&sl->refcnt)) {
+		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(10);
+	}
 
 	sysfs_remove_bin_file (&sl->dev.kobj, &sl->attr_bin);
 	device_remove_file(&sl->dev, &sl->attr_name);

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-27 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-20 23:59 [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] mtd/cfi_cmdset_0020: Nishanth Aravamudan
2004-09-24 23:20 ` [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] pci hotplug/shpchp: replace Nishanth Aravamudan
2004-09-27 17:28 ` [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] sbus/envctrl: replace Nishanth Aravamudan
2004-09-27 23:20 ` [Kernel-janitors] [PATCH 2.6.9-rc2 4/4] w1/w1: add Nishanth Aravamudan

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.