mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] test12-pre8 task queue fix batch
@ 2000-12-11  0:20 Mohammad A. Haque
  2000-12-11  0:49 ` Mohammad A. Haque
  2000-12-11  1:36 ` Ingo Oeser
  0 siblings, 2 replies; 4+ messages in thread
From: Mohammad A. Haque @ 2000-12-11  0:20 UTC (permalink / raw)
  To: linux-kernel

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

Lets see if this is the gist of them...

-- 

=====================================================================
Mohammad A. Haque                              http://www.haque.net/ 
                                               mhaque@haque.net

  "Alcohol and calculus don't mix.             Project Lead
   Don't drink and derive." --Unknown          http://wm.themes.org/
                                               batmanppc@themes.org
=====================================================================

[-- Attachment #2: tq_struct-t12p8-fix-3.diff --]
[-- Type: text/plain, Size: 10845 bytes --]

diff -urw linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c linux-2.4.0-test12/drivers/char/drm/gamma_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c	Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/gamma_dma.c	Sun Dec 10 19:04:01 2000
@@ -651,7 +651,7 @@
 	dev->dma->next_queue  = NULL;
 	dev->dma->this_buffer = NULL;
 
-	dev->tq.next	      = NULL;
+	INIT_LIST_HEAD(&dev->tq.list);
 	dev->tq.sync	      = 0;
 	dev->tq.routine	      = gamma_dma_schedule_tq_wrapper;
 	dev->tq.data	      = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c linux-2.4.0-test12/drivers/char/drm/i810_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c	Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/i810_dma.c	Sun Dec 10 19:04:32 2000
@@ -924,7 +924,7 @@
 	dev->dma->next_queue  = NULL;
 	dev->dma->this_buffer = NULL;
 
-	dev->tq.next	      = NULL;
+	INIT_LIST_HEAD(&dev->tq.list);
 	dev->tq.sync	      = 0;
 	dev->tq.routine	      = i810_dma_task_queue;
 	dev->tq.data	      = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c linux-2.4.0-test12/drivers/char/drm/mga_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c	Sun Dec 10 13:49:22 2000
+++ linux-2.4.0-test12/drivers/char/drm/mga_dma.c	Sun Dec 10 19:05:43 2000
@@ -818,7 +818,7 @@
 	dev->dma->next_buffer = NULL;
 	dev->dma->next_queue  = NULL;
 	dev->dma->this_buffer = NULL;
-	dev->tq.next	      = NULL;
+	INIT_LIST_HEAD(&dev->tq.list);
 	dev->tq.sync	      = 0;
 	dev->tq.routine	      = mga_dma_task_queue;
 	dev->tq.data	      = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/n_r3964.c linux-2.4.0-test12/drivers/char/n_r3964.c
--- linux-2.4.0-test12.old/drivers/char/n_r3964.c	Fri Jul 21 22:51:56 2000
+++ linux-2.4.0-test12/drivers/char/n_r3964.c	Sun Dec 10 19:02:28 2000
@@ -1157,12 +1157,12 @@
     * Add 'on_timer' to timer task queue
     * (will be called from timer bh)
     */
-   pInfo->bh_1.next = NULL;
+   INIT_LIST_HEAD(&pInfo->bh_1.list);
    pInfo->bh_1.sync = 0;
    pInfo->bh_1.routine = &on_timer_1;
    pInfo->bh_1.data = pInfo;
    
-   pInfo->bh_2.next = NULL;
+   INIT_LIST_HEAD(&pInfo->bh_2.list);
    pInfo->bh_2.sync = 0;
    pInfo->bh_2.routine = &on_timer_2;
    pInfo->bh_2.data = pInfo;
diff -urw linux-2.4.0-test12.old/drivers/char/scan_keyb.c linux-2.4.0-test12/drivers/char/scan_keyb.c
--- linux-2.4.0-test12.old/drivers/char/scan_keyb.c	Tue Oct  3 14:13:21 2000
+++ linux-2.4.0-test12/drivers/char/scan_keyb.c	Sun Dec 10 19:06:20 2000
@@ -120,7 +120,7 @@
 void __init scan_kbd_init(void)
 {
 
-	task_scan_kbd.next=NULL;
+	INIT_LIST_HEAD(task_scan_kbd.list);
 	task_scan_kbd.sync=0;
 	task_scan_kbd.routine=scan_kbd;
 	task_scan_kbd.data=NULL;
diff -urw linux-2.4.0-test12.old/drivers/i2o/i2o_lan.c linux-2.4.0-test12/drivers/i2o/i2o_lan.c
--- linux-2.4.0-test12.old/drivers/i2o/i2o_lan.c	Sun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/drivers/i2o/i2o_lan.c	Sun Dec 10 17:46:07 2000
@@ -112,8 +112,10 @@
 };
 static int lan_context;
 
-static struct tq_struct i2o_post_buckets_task = {
-	0, 0, (void (*)(void *))i2o_lan_receive_post, (void *) 0
+DECLARE_TASK_QUEUE(i2o_post_buckets_task);
+struct tq_struct run_i2o_post_buckets_task = {
+	routine: (void (*)(void *)) run_task_queue,
+	data: (void *) 0
 };
 
 /* Functions to handle message failures and transaction errors:
@@ -379,8 +381,8 @@
 	/* If DDM has already consumed bucket_thresh buckets, post new ones */
 
 	if (atomic_read(&priv->buckets_out) <= priv->max_buckets_out - priv->bucket_thresh) {
-		i2o_post_buckets_task.data = (void *)dev;
-		queue_task(&i2o_post_buckets_task, &tq_immediate);
+		run_i2o_post_buckets_task.data = (void *)dev;
+		queue_task(&run_i2o_post_buckets_task, &tq_immediate);
 		mark_bh(IMMEDIATE_BH);
 	}
 
@@ -1401,7 +1403,7 @@
 	atomic_set(&priv->tx_out, 0);
 	priv->tx_count = 0;
 
-	priv->i2o_batch_send_task.next    = NULL;
+	INIT_LIST_HEAD(&priv->i2o_batch_send_task.list);
 	priv->i2o_batch_send_task.sync    = 0;
 	priv->i2o_batch_send_task.routine = (void *)i2o_lan_batch_send;
 	priv->i2o_batch_send_task.data    = (void *)dev;
diff -urw linux-2.4.0-test12.old/drivers/ieee1394/guid.c linux-2.4.0-test12/drivers/ieee1394/guid.c
--- linux-2.4.0-test12.old/drivers/ieee1394/guid.c	Wed Jul  5 16:03:56 2000
+++ linux-2.4.0-test12/drivers/ieee1394/guid.c	Sun Dec 10 19:10:10 2000
@@ -163,7 +163,7 @@
                         return;
                 }
 
-                greq->tq.next = NULL;
+                INIT_LIST_HEAD(&greq->tq.list);
                 greq->tq.sync = 0;
                 greq->tq.routine = (void (*)(void*))pkt_complete;
                 greq->tq.data = greq;
diff -urw linux-2.4.0-test12.old/drivers/ieee1394/ohci1394.c linux-2.4.0-test12/drivers/ieee1394/ohci1394.c
--- linux-2.4.0-test12.old/drivers/ieee1394/ohci1394.c	Tue Oct  3 14:13:54 2000
+++ linux-2.4.0-test12/drivers/ieee1394/ohci1394.c	Sun Dec 10 19:13:57 2000
@@ -1585,7 +1585,7 @@
 
         /* initialize bottom handler */
         d->task.sync = 0;
-        d->task.next = NULL;
+        INIT_LIST_HEAD(&d->task.list);
         d->task.routine = dma_rcv_bh;
         d->task.data = (void*)d;
 
diff -urw linux-2.4.0-test12.old/drivers/isdn/pcbit/drv.c linux-2.4.0-test12/drivers/isdn/pcbit/drv.c
--- linux-2.4.0-test12.old/drivers/isdn/pcbit/drv.c	Sun Nov 19 21:56:25 2000
+++ linux-2.4.0-test12/drivers/isdn/pcbit/drv.c	Sun Dec 10 19:07:11 2000
@@ -135,7 +135,7 @@
 	dev->b2->id = 1;
 
 
-	dev->qdelivery.next = NULL;
+	INIT_LIST_HEAD(&dev->qdelivery.list);
 	dev->qdelivery.sync = 0;
 	dev->qdelivery.routine = pcbit_deliver;
 	dev->qdelivery.data = dev;
diff -urw linux-2.4.0-test12.old/drivers/net/acenic.c linux-2.4.0-test12/drivers/net/acenic.c
--- linux-2.4.0-test12.old/drivers/net/acenic.c	Sun Nov 19 21:56:27 2000
+++ linux-2.4.0-test12/drivers/net/acenic.c	Sun Dec 10 19:02:42 2000
@@ -2223,7 +2223,7 @@
 	/*
 	 * Setup the bottom half rx ring refill handler
 	 */
-	ap->immediate.next = NULL;
+	INIT_LIST_HEAD(&ap->immediate.list);
 	ap->immediate.sync = 0;
 	ap->immediate.routine = (void *)(void *)ace_bh;
 	ap->immediate.data = dev;
diff -urw linux-2.4.0-test12.old/drivers/net/aironet4500_core.c linux-2.4.0-test12/drivers/net/aironet4500_core.c
--- linux-2.4.0-test12.old/drivers/net/aironet4500_core.c	Sun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/drivers/net/aironet4500_core.c	Sun Dec 10 17:46:07 2000
@@ -2868,7 +2868,7 @@
 	
 	priv->command_semaphore_on = 0;
 	priv->unlock_command_postponed = 0;
-	priv->immediate_bh.next 	= NULL;
+	INIT_LIST_HEAD(&priv->immediate_bh.list);
 	priv->immediate_bh.sync 	= 0;
 	priv->immediate_bh.routine 	= (void *)(void *)awc_bh;
 	priv->immediate_bh.data 	= dev;
diff -urw linux-2.4.0-test12.old/drivers/net/plip.c linux-2.4.0-test12/drivers/net/plip.c
--- linux-2.4.0-test12.old/drivers/net/plip.c	Sun Dec 10 13:49:23 2000
+++ linux-2.4.0-test12/drivers/net/plip.c	Sun Dec 10 19:03:11 2000
@@ -349,18 +349,18 @@
 	nl->nibble	= PLIP_NIBBLE_WAIT;
 
 	/* Initialize task queue structures */
-	nl->immediate.next = NULL;
+	INIT_LIST_HEAD(&nl->immediate.list);
 	nl->immediate.sync = 0;
 	nl->immediate.routine = (void (*)(void *))plip_bh;
 	nl->immediate.data = dev;
 
-	nl->deferred.next = NULL;
+	INIT_LIST_HEAD(&nl->deferred.list);
 	nl->deferred.sync = 0;
 	nl->deferred.routine = (void (*)(void *))plip_kick_bh;
 	nl->deferred.data = dev;
 
 	if (dev->irq == -1) {
-		nl->timer.next = NULL;
+		INIT_LIST_HEAD(&nl->timer.list);
 		nl->timer.sync = 0;
 		nl->timer.routine = (void (*)(void *))plip_timer_bh;
 		nl->timer.data = dev;
diff -urw linux-2.4.0-test12.old/drivers/s390/net/ctc.c linux-2.4.0-test12/drivers/s390/net/ctc.c
--- linux-2.4.0-test12.old/drivers/s390/net/ctc.c	Fri May 12 14:41:44 2000
+++ linux-2.4.0-test12/drivers/s390/net/ctc.c	Sun Dec 10 19:10:37 2000
@@ -1313,7 +1313,7 @@
                                 return -ENOMEM;
                 }
                 init_waitqueue_head(&privptr->channel[i].wait);
-                privptr->channel[i].tq.next = NULL;
+                INIT_LIST_HEAD(&privptr->channel[i].tq.list);
                 privptr->channel[i].tq.sync = 0;
                 privptr->channel[i].tq.routine = (void *)(void *)ctc_irq_bh;
                 privptr->channel[i].tq.data = &privptr->channel[i]; 
diff -urw linux-2.4.0-test12.old/drivers/sbus/audio/dmy.c linux-2.4.0-test12/drivers/sbus/audio/dmy.c
--- linux-2.4.0-test12.old/drivers/sbus/audio/dmy.c	Tue Dec 21 01:06:42 1999
+++ linux-2.4.0-test12/drivers/sbus/audio/dmy.c	Sun Dec 10 19:08:58 2000
@@ -547,7 +547,7 @@
         dummy_chip->perchip_info.play.active = 1;
 
         /* fake an "interrupt" to deal with this block */
-        dummy_chip->tqueue.next = NULL;
+        INIT_LIST_HEAD(&dummy_chip->tqueue.list);
         dummy_chip->tqueue.sync = 0;
         dummy_chip->tqueue.routine = dummy_output_done_task;
         dummy_chip->tqueue.data = drv;
diff -urw linux-2.4.0-test12.old/drivers/usb/serial/digi_acceleport.c linux-2.4.0-test12/drivers/usb/serial/digi_acceleport.c
--- linux-2.4.0-test12.old/drivers/usb/serial/digi_acceleport.c	Sun Dec 10 13:49:23 2000
+++ linux-2.4.0-test12/drivers/usb/serial/digi_acceleport.c	Sun Dec 10 19:09:38 2000
@@ -1738,7 +1738,7 @@
 		init_waitqueue_head( &priv->dp_flush_wait );
 		priv->dp_in_close = 0;
 		init_waitqueue_head( &priv->dp_close_wait );
-		priv->dp_wakeup_task.next = NULL;
+		INIT_LIST_HEAD(&priv->dp_wakeup_task.list);
 		priv->dp_wakeup_task.sync = 0;
 		priv->dp_wakeup_task.routine = (void *)digi_wakeup_write_lock;
 		priv->dp_wakeup_task.data = (void *)(&serial->port[i]);
diff -urw linux-2.4.0-test12.old/drivers/usb/serial/keyspan_pda.c linux-2.4.0-test12/drivers/usb/serial/keyspan_pda.c
--- linux-2.4.0-test12.old/drivers/usb/serial/keyspan_pda.c	Sun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/drivers/usb/serial/keyspan_pda.c	Sun Dec 10 17:46:07 2000
@@ -742,11 +742,11 @@
 	if (!priv)
 		return (1); /* error */
 	init_waitqueue_head(&serial->port[0].write_wait);
-	priv->wakeup_task.next = NULL;
+	INIT_LIST_HEAD(&priv->wakeup_task.list);
 	priv->wakeup_task.sync = 0;
 	priv->wakeup_task.routine = (void *)keyspan_pda_wakeup_write;
 	priv->wakeup_task.data = (void *)(&serial->port[0]);
-	priv->unthrottle_task.next = NULL;
+	INIT_LIST_HEAD(&priv->unthrottle_task.list);
 	priv->unthrottle_task.sync = 0;
 	priv->unthrottle_task.routine = (void *)keyspan_pda_request_unthrottle;
 	priv->unthrottle_task.data = (void *)(serial);
diff -urw linux-2.4.0-test12.old/fs/smbfs/sock.c linux-2.4.0-test12/fs/smbfs/sock.c
--- linux-2.4.0-test12.old/fs/smbfs/sock.c	Sun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/fs/smbfs/sock.c	Sun Dec 10 17:46:07 2000
@@ -163,7 +163,7 @@
 		found_data(sk);
 		return;
 	}
-	job->cb.next = NULL;
+	INIT_LIST_HEAD(&job->cb.list);
 	job->cb.sync = 0;
 	job->cb.routine = smb_data_callback;
 	job->cb.data = job;

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

* Re: [PATCH] test12-pre8 task queue fix batch
  2000-12-11  0:20 [PATCH] test12-pre8 task queue fix batch Mohammad A. Haque
@ 2000-12-11  0:49 ` Mohammad A. Haque
  2000-12-11 10:11   ` Kai Germaschewski
  2000-12-11  1:36 ` Ingo Oeser
  1 sibling, 1 reply; 4+ messages in thread
From: Mohammad A. Haque @ 2000-12-11  0:49 UTC (permalink / raw)
  To: linux-kernel

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

More fixes. Ignore previous.

"Mohammad A. Haque" wrote:
> 
> Lets see if this is the gist of them...

-- 

=====================================================================
Mohammad A. Haque                              http://www.haque.net/ 
                                               mhaque@haque.net

  "Alcohol and calculus don't mix.             Project Lead
   Don't drink and derive." --Unknown          http://wm.themes.org/
                                               batmanppc@themes.org
=====================================================================

[-- Attachment #2: tq_struct-t12p8-fix-4.diff --]
[-- Type: text/plain, Size: 12954 bytes --]

diff -urw linux-2.4.0-test12.old/drivers/atm/ambassador.c linux-2.4.0-test12/drivers/atm/ambassador.c
--- linux-2.4.0-test12.old/drivers/atm/ambassador.c	Fri Jul  7 00:37:24 2000
+++ linux-2.4.0-test12/drivers/atm/ambassador.c	Sun Dec 10 19:44:09 2000
@@ -2397,7 +2397,7 @@
       
 #ifdef FILL_RX_POOLS_IN_BH
       // initialise bottom half
-      dev->bh.next = 0;
+      INIT_LIST_HEAD(&dev->bh.list);
       dev->bh.sync = 0;
       dev->bh.routine = (void (*)(void *)) fill_rx_pools;
       dev->bh.data = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c linux-2.4.0-test12/drivers/char/drm/gamma_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/gamma_dma.c	Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/gamma_dma.c	Sun Dec 10 19:04:01 2000
@@ -651,7 +651,7 @@
 	dev->dma->next_queue  = NULL;
 	dev->dma->this_buffer = NULL;
 
-	dev->tq.next	      = NULL;
+	INIT_LIST_HEAD(&dev->tq.list);
 	dev->tq.sync	      = 0;
 	dev->tq.routine	      = gamma_dma_schedule_tq_wrapper;
 	dev->tq.data	      = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c linux-2.4.0-test12/drivers/char/drm/i810_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/i810_dma.c	Tue Oct  3 14:13:53 2000
+++ linux-2.4.0-test12/drivers/char/drm/i810_dma.c	Sun Dec 10 19:04:32 2000
@@ -924,7 +924,7 @@
 	dev->dma->next_queue  = NULL;
 	dev->dma->this_buffer = NULL;
 
-	dev->tq.next	      = NULL;
+	INIT_LIST_HEAD(&dev->tq.list);
 	dev->tq.sync	      = 0;
 	dev->tq.routine	      = i810_dma_task_queue;
 	dev->tq.data	      = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c linux-2.4.0-test12/drivers/char/drm/mga_dma.c
--- linux-2.4.0-test12.old/drivers/char/drm/mga_dma.c	Sun Dec 10 13:49:22 2000
+++ linux-2.4.0-test12/drivers/char/drm/mga_dma.c	Sun Dec 10 19:05:43 2000
@@ -818,7 +818,7 @@
 	dev->dma->next_buffer = NULL;
 	dev->dma->next_queue  = NULL;
 	dev->dma->this_buffer = NULL;
-	dev->tq.next	      = NULL;
+	INIT_LIST_HEAD(&dev->tq.list);
 	dev->tq.sync	      = 0;
 	dev->tq.routine	      = mga_dma_task_queue;
 	dev->tq.data	      = dev;
diff -urw linux-2.4.0-test12.old/drivers/char/n_r3964.c linux-2.4.0-test12/drivers/char/n_r3964.c
--- linux-2.4.0-test12.old/drivers/char/n_r3964.c	Fri Jul 21 22:51:56 2000
+++ linux-2.4.0-test12/drivers/char/n_r3964.c	Sun Dec 10 19:02:28 2000
@@ -1157,12 +1157,12 @@
     * Add 'on_timer' to timer task queue
     * (will be called from timer bh)
     */
-   pInfo->bh_1.next = NULL;
+   INIT_LIST_HEAD(&pInfo->bh_1.list);
    pInfo->bh_1.sync = 0;
    pInfo->bh_1.routine = &on_timer_1;
    pInfo->bh_1.data = pInfo;
    
-   pInfo->bh_2.next = NULL;
+   INIT_LIST_HEAD(&pInfo->bh_2.list);
    pInfo->bh_2.sync = 0;
    pInfo->bh_2.routine = &on_timer_2;
    pInfo->bh_2.data = pInfo;
diff -urw linux-2.4.0-test12.old/drivers/char/scan_keyb.c linux-2.4.0-test12/drivers/char/scan_keyb.c
--- linux-2.4.0-test12.old/drivers/char/scan_keyb.c	Tue Oct  3 14:13:21 2000
+++ linux-2.4.0-test12/drivers/char/scan_keyb.c	Sun Dec 10 19:06:20 2000
@@ -120,7 +120,7 @@
 void __init scan_kbd_init(void)
 {
 
-	task_scan_kbd.next=NULL;
+	INIT_LIST_HEAD(task_scan_kbd.list);
 	task_scan_kbd.sync=0;
 	task_scan_kbd.routine=scan_kbd;
 	task_scan_kbd.data=NULL;
diff -urw linux-2.4.0-test12.old/drivers/i2o/i2o_lan.c linux-2.4.0-test12/drivers/i2o/i2o_lan.c
--- linux-2.4.0-test12.old/drivers/i2o/i2o_lan.c	Sun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/drivers/i2o/i2o_lan.c	Sun Dec 10 17:46:07 2000
@@ -112,8 +112,10 @@
 };
 static int lan_context;
 
-static struct tq_struct i2o_post_buckets_task = {
-	0, 0, (void (*)(void *))i2o_lan_receive_post, (void *) 0
+DECLARE_TASK_QUEUE(i2o_post_buckets_task);
+struct tq_struct run_i2o_post_buckets_task = {
+	routine: (void (*)(void *)) run_task_queue,
+	data: (void *) 0
 };
 
 /* Functions to handle message failures and transaction errors:
@@ -379,8 +381,8 @@
 	/* If DDM has already consumed bucket_thresh buckets, post new ones */
 
 	if (atomic_read(&priv->buckets_out) <= priv->max_buckets_out - priv->bucket_thresh) {
-		i2o_post_buckets_task.data = (void *)dev;
-		queue_task(&i2o_post_buckets_task, &tq_immediate);
+		run_i2o_post_buckets_task.data = (void *)dev;
+		queue_task(&run_i2o_post_buckets_task, &tq_immediate);
 		mark_bh(IMMEDIATE_BH);
 	}
 
@@ -1401,7 +1403,7 @@
 	atomic_set(&priv->tx_out, 0);
 	priv->tx_count = 0;
 
-	priv->i2o_batch_send_task.next    = NULL;
+	INIT_LIST_HEAD(&priv->i2o_batch_send_task.list);
 	priv->i2o_batch_send_task.sync    = 0;
 	priv->i2o_batch_send_task.routine = (void *)i2o_lan_batch_send;
 	priv->i2o_batch_send_task.data    = (void *)dev;
diff -urw linux-2.4.0-test12.old/drivers/ieee1394/guid.c linux-2.4.0-test12/drivers/ieee1394/guid.c
--- linux-2.4.0-test12.old/drivers/ieee1394/guid.c	Wed Jul  5 16:03:56 2000
+++ linux-2.4.0-test12/drivers/ieee1394/guid.c	Sun Dec 10 19:10:10 2000
@@ -163,7 +163,7 @@
                         return;
                 }
 
-                greq->tq.next = NULL;
+                INIT_LIST_HEAD(&greq->tq.list);
                 greq->tq.sync = 0;
                 greq->tq.routine = (void (*)(void*))pkt_complete;
                 greq->tq.data = greq;
diff -urw linux-2.4.0-test12.old/drivers/ieee1394/ohci1394.c linux-2.4.0-test12/drivers/ieee1394/ohci1394.c
--- linux-2.4.0-test12.old/drivers/ieee1394/ohci1394.c	Tue Oct  3 14:13:54 2000
+++ linux-2.4.0-test12/drivers/ieee1394/ohci1394.c	Sun Dec 10 19:13:57 2000
@@ -1585,7 +1585,7 @@
 
         /* initialize bottom handler */
         d->task.sync = 0;
-        d->task.next = NULL;
+        INIT_LIST_HEAD(&d->task.list);
         d->task.routine = dma_rcv_bh;
         d->task.data = (void*)d;
 
diff -urw linux-2.4.0-test12.old/drivers/isdn/hisax/config.c linux-2.4.0-test12/drivers/isdn/hisax/config.c
--- linux-2.4.0-test12.old/drivers/isdn/hisax/config.c	Sun Dec 10 13:49:22 2000
+++ linux-2.4.0-test12/drivers/isdn/hisax/config.c	Sun Dec 10 19:43:07 2000
@@ -1180,7 +1180,7 @@
 	cs->tx_skb = NULL;
 	cs->tx_cnt = 0;
 	cs->event = 0;
-	cs->tqueue.next = 0;
+	INIT_LIST_HEAD(&cs->tqueue.list);
 	cs->tqueue.sync = 0;
 	cs->tqueue.data = cs;
 
diff -urw linux-2.4.0-test12.old/drivers/isdn/hisax/isdnl1.c linux-2.4.0-test12/drivers/isdn/hisax/isdnl1.c
--- linux-2.4.0-test12.old/drivers/isdn/hisax/isdnl1.c	Sun Dec 10 13:49:22 2000
+++ linux-2.4.0-test12/drivers/isdn/hisax/isdnl1.c	Sun Dec 10 19:42:42 2000
@@ -343,7 +343,7 @@
 
 	bcs->cs = cs;
 	bcs->channel = bc;
-	bcs->tqueue.next = 0;
+	INIT_LIST_HEAD(&bcs->tqueue.list);
 	bcs->tqueue.sync = 0;
 	bcs->tqueue.routine = (void *) (void *) BChannel_bh;
 	bcs->tqueue.data = bcs;
diff -urw linux-2.4.0-test12.old/drivers/isdn/hysdn/boardergo.c linux-2.4.0-test12/drivers/isdn/hysdn/boardergo.c
--- linux-2.4.0-test12.old/drivers/isdn/hysdn/boardergo.c	Sun Dec 10 13:49:23 2000
+++ linux-2.4.0-test12/drivers/isdn/hysdn/boardergo.c	Sun Dec 10 19:43:44 2000
@@ -458,7 +458,7 @@
 	card->writebootseq = ergo_writebootseq;
 	card->waitpofready = ergo_waitpofready;
 	card->set_errlog_state = ergo_set_errlog_state;
-	card->irq_queue.next = 0;
+	INIT_LIST_HEAD(&card->irq_queue.list);
 	card->irq_queue.sync = 0;
 	card->irq_queue.data = card;	/* init task queue for interrupt */
 	card->irq_queue.routine = (void *) (void *) ergo_irq_bh;
diff -urw linux-2.4.0-test12.old/drivers/isdn/pcbit/drv.c linux-2.4.0-test12/drivers/isdn/pcbit/drv.c
--- linux-2.4.0-test12.old/drivers/isdn/pcbit/drv.c	Sun Nov 19 21:56:25 2000
+++ linux-2.4.0-test12/drivers/isdn/pcbit/drv.c	Sun Dec 10 19:07:11 2000
@@ -135,7 +135,7 @@
 	dev->b2->id = 1;
 
 
-	dev->qdelivery.next = NULL;
+	INIT_LIST_HEAD(&dev->qdelivery.list);
 	dev->qdelivery.sync = 0;
 	dev->qdelivery.routine = pcbit_deliver;
 	dev->qdelivery.data = dev;
diff -urw linux-2.4.0-test12.old/drivers/net/acenic.c linux-2.4.0-test12/drivers/net/acenic.c
--- linux-2.4.0-test12.old/drivers/net/acenic.c	Sun Nov 19 21:56:27 2000
+++ linux-2.4.0-test12/drivers/net/acenic.c	Sun Dec 10 19:02:42 2000
@@ -2223,7 +2223,7 @@
 	/*
 	 * Setup the bottom half rx ring refill handler
 	 */
-	ap->immediate.next = NULL;
+	INIT_LIST_HEAD(&ap->immediate.list);
 	ap->immediate.sync = 0;
 	ap->immediate.routine = (void *)(void *)ace_bh;
 	ap->immediate.data = dev;
diff -urw linux-2.4.0-test12.old/drivers/net/aironet4500_core.c linux-2.4.0-test12/drivers/net/aironet4500_core.c
--- linux-2.4.0-test12.old/drivers/net/aironet4500_core.c	Sun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/drivers/net/aironet4500_core.c	Sun Dec 10 17:46:07 2000
@@ -2868,7 +2868,7 @@
 	
 	priv->command_semaphore_on = 0;
 	priv->unlock_command_postponed = 0;
-	priv->immediate_bh.next 	= NULL;
+	INIT_LIST_HEAD(&priv->immediate_bh.list);
 	priv->immediate_bh.sync 	= 0;
 	priv->immediate_bh.routine 	= (void *)(void *)awc_bh;
 	priv->immediate_bh.data 	= dev;
diff -urw linux-2.4.0-test12.old/drivers/net/plip.c linux-2.4.0-test12/drivers/net/plip.c
--- linux-2.4.0-test12.old/drivers/net/plip.c	Sun Dec 10 13:49:23 2000
+++ linux-2.4.0-test12/drivers/net/plip.c	Sun Dec 10 19:03:11 2000
@@ -349,18 +349,18 @@
 	nl->nibble	= PLIP_NIBBLE_WAIT;
 
 	/* Initialize task queue structures */
-	nl->immediate.next = NULL;
+	INIT_LIST_HEAD(&nl->immediate.list);
 	nl->immediate.sync = 0;
 	nl->immediate.routine = (void (*)(void *))plip_bh;
 	nl->immediate.data = dev;
 
-	nl->deferred.next = NULL;
+	INIT_LIST_HEAD(&nl->deferred.list);
 	nl->deferred.sync = 0;
 	nl->deferred.routine = (void (*)(void *))plip_kick_bh;
 	nl->deferred.data = dev;
 
 	if (dev->irq == -1) {
-		nl->timer.next = NULL;
+		INIT_LIST_HEAD(&nl->timer.list);
 		nl->timer.sync = 0;
 		nl->timer.routine = (void (*)(void *))plip_timer_bh;
 		nl->timer.data = dev;
diff -urw linux-2.4.0-test12.old/drivers/s390/net/ctc.c linux-2.4.0-test12/drivers/s390/net/ctc.c
--- linux-2.4.0-test12.old/drivers/s390/net/ctc.c	Fri May 12 14:41:44 2000
+++ linux-2.4.0-test12/drivers/s390/net/ctc.c	Sun Dec 10 19:10:37 2000
@@ -1313,7 +1313,7 @@
                                 return -ENOMEM;
                 }
                 init_waitqueue_head(&privptr->channel[i].wait);
-                privptr->channel[i].tq.next = NULL;
+                INIT_LIST_HEAD(&privptr->channel[i].tq.list);
                 privptr->channel[i].tq.sync = 0;
                 privptr->channel[i].tq.routine = (void *)(void *)ctc_irq_bh;
                 privptr->channel[i].tq.data = &privptr->channel[i]; 
diff -urw linux-2.4.0-test12.old/drivers/sbus/audio/dmy.c linux-2.4.0-test12/drivers/sbus/audio/dmy.c
--- linux-2.4.0-test12.old/drivers/sbus/audio/dmy.c	Tue Dec 21 01:06:42 1999
+++ linux-2.4.0-test12/drivers/sbus/audio/dmy.c	Sun Dec 10 19:08:58 2000
@@ -547,7 +547,7 @@
         dummy_chip->perchip_info.play.active = 1;
 
         /* fake an "interrupt" to deal with this block */
-        dummy_chip->tqueue.next = NULL;
+        INIT_LIST_HEAD(&dummy_chip->tqueue.list);
         dummy_chip->tqueue.sync = 0;
         dummy_chip->tqueue.routine = dummy_output_done_task;
         dummy_chip->tqueue.data = drv;
diff -urw linux-2.4.0-test12.old/drivers/usb/serial/digi_acceleport.c linux-2.4.0-test12/drivers/usb/serial/digi_acceleport.c
--- linux-2.4.0-test12.old/drivers/usb/serial/digi_acceleport.c	Sun Dec 10 13:49:23 2000
+++ linux-2.4.0-test12/drivers/usb/serial/digi_acceleport.c	Sun Dec 10 19:09:38 2000
@@ -1738,7 +1738,7 @@
 		init_waitqueue_head( &priv->dp_flush_wait );
 		priv->dp_in_close = 0;
 		init_waitqueue_head( &priv->dp_close_wait );
-		priv->dp_wakeup_task.next = NULL;
+		INIT_LIST_HEAD(&priv->dp_wakeup_task.list);
 		priv->dp_wakeup_task.sync = 0;
 		priv->dp_wakeup_task.routine = (void *)digi_wakeup_write_lock;
 		priv->dp_wakeup_task.data = (void *)(&serial->port[i]);
diff -urw linux-2.4.0-test12.old/drivers/usb/serial/keyspan_pda.c linux-2.4.0-test12/drivers/usb/serial/keyspan_pda.c
--- linux-2.4.0-test12.old/drivers/usb/serial/keyspan_pda.c	Sun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/drivers/usb/serial/keyspan_pda.c	Sun Dec 10 17:46:07 2000
@@ -742,11 +742,11 @@
 	if (!priv)
 		return (1); /* error */
 	init_waitqueue_head(&serial->port[0].write_wait);
-	priv->wakeup_task.next = NULL;
+	INIT_LIST_HEAD(&priv->wakeup_task.list);
 	priv->wakeup_task.sync = 0;
 	priv->wakeup_task.routine = (void *)keyspan_pda_wakeup_write;
 	priv->wakeup_task.data = (void *)(&serial->port[0]);
-	priv->unthrottle_task.next = NULL;
+	INIT_LIST_HEAD(&priv->unthrottle_task.list);
 	priv->unthrottle_task.sync = 0;
 	priv->unthrottle_task.routine = (void *)keyspan_pda_request_unthrottle;
 	priv->unthrottle_task.data = (void *)(serial);
diff -urw linux-2.4.0-test12.old/fs/smbfs/sock.c linux-2.4.0-test12/fs/smbfs/sock.c
--- linux-2.4.0-test12.old/fs/smbfs/sock.c	Sun Dec 10 19:14:36 2000
+++ linux-2.4.0-test12/fs/smbfs/sock.c	Sun Dec 10 17:46:07 2000
@@ -163,7 +163,7 @@
 		found_data(sk);
 		return;
 	}
-	job->cb.next = NULL;
+	INIT_LIST_HEAD(&job->cb.list);
 	job->cb.sync = 0;
 	job->cb.routine = smb_data_callback;
 	job->cb.data = job;

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

* Re: [PATCH] test12-pre8 task queue fix batch
  2000-12-11  0:20 [PATCH] test12-pre8 task queue fix batch Mohammad A. Haque
  2000-12-11  0:49 ` Mohammad A. Haque
@ 2000-12-11  1:36 ` Ingo Oeser
  1 sibling, 0 replies; 4+ messages in thread
From: Ingo Oeser @ 2000-12-11  1:36 UTC (permalink / raw)
  To: Mohammad A. Haque; +Cc: linux-kernel

On Sun, Dec 10, 2000 at 07:20:56PM -0500, Mohammad A. Haque wrote:
> Lets see if this is the gist of them...
 
At least one more to fix:

diff -ru linux-2.4.0-test12-pre8/drivers/isdn/hisax/config.c linux/drivers/isdn/hisax/config.c
--- linux-2.4.0-test12-pre8/drivers/isdn/hisax/config.c Sun Dec 10 20:38:55 2000+++ linux/drivers/isdn/hisax/config.c      Mon Dec 11 01:04:16 2000
@@ -1180,7 +1180,7 @@
        cs->tx_skb = NULL;
        cs->tx_cnt = 0;
        cs->event = 0;
-       cs->tqueue.next = 0;
+       INIT_LIST_HEAD(&cs->tqueue.list);
        cs->tqueue.sync = 0;
        cs->tqueue.data = cs;



Regards 

Ingo Oeser
-- 
10.+11.03.2001 - 3. Chemnitzer LinuxTag <http://www.tu-chemnitz.de/linux/tag>
         <<<<<<<<<<<<       come and join the fun       >>>>>>>>>>>>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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

* Re: [PATCH] test12-pre8 task queue fix batch
  2000-12-11  0:49 ` Mohammad A. Haque
@ 2000-12-11 10:11   ` Kai Germaschewski
  0 siblings, 0 replies; 4+ messages in thread
From: Kai Germaschewski @ 2000-12-11 10:11 UTC (permalink / raw)
  To: Mohammad A. Haque; +Cc: linux-kernel



On Sun, 10 Dec 2000, Mohammad A. Haque wrote:

> More fixes. Ignore previous.

diff -urw linux-2.4.0-test12.old/drivers/atm/ambassador.c linux-2.4.0-test12/drivers/atm/ambassador.c
--- linux-2.4.0-test12.old/drivers/atm/ambassador.c	Fri Jul  7 00:37:24 2000
+++ linux-2.4.0-test12/drivers/atm/ambassador.c	Sun Dec 10 19:44:09 2000
@@ -2397,7 +2397,7 @@
       
 #ifdef FILL_RX_POOLS_IN_BH
       // initialise bottom half
-      dev->bh.next = 0;
+      INIT_LIST_HEAD(&dev->bh.list);
       dev->bh.sync = 0;
       dev->bh.routine = (void (*)(void *)) fill_rx_pools;
       dev->bh.data = dev;

> (and so on)



I don't think this is the right fix. First of all, if one needed to the
INIT_LIST_HEAD, some new macro should be introduced (INIT_TASK or
something), which takes care of the .list and .sync structures. So when
something was about to change again in the future, you wouldn't have to go
through all the files and fix them again.

But: The INIT_LIST_HEAD is unnecessary and misleading at least, because
tqueue->list is not a list head, it's there to allow for adding the struct
tqueue onto a task_queue. So we have the task_queue, that's the list head
- it needs to be initialized, and that's already done via
DECLARE_TASK_QUEUE. Then we have tasks to be added to the list (struct
tqueue), their .list members don't need to be initialized because they get
set when the task is queued on a task_queue (in queue_task).

So I think the correct fix is just to remove the offending lines.

--Kai


 

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

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

end of thread, other threads:[~2000-12-11 10:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-11  0:20 [PATCH] test12-pre8 task queue fix batch Mohammad A. Haque
2000-12-11  0:49 ` Mohammad A. Haque
2000-12-11 10:11   ` Kai Germaschewski
2000-12-11  1:36 ` Ingo Oeser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®