Patch pre7-4: Update struct_timer.list update for all (at least x86) files

From: Adam J. Richter (adam@yggdrasil.com)
Date: Thu May 04 2000 - 10:19:49 EDT

  • Next message: Linda Walsh: "Re: under CONFIG_EXPERIMENTAL? (was Re: Why auditing and ACL's areimportant (was: audit_ids system calls))"

            The is a small change to struct timer in pre7-4. Instead of
    each timer having "prev" and "next" links, management of the doubly
    linked list is handled with a struct "list", which contains the
    "next" and "prev" fields. I am assuming that the semanitics of
    things like list.next == NULL are the same as the old next == NULL
    semantics, and so on. On that assumption, here is a patch that adjusts
    the rest of the kernel to the change that appeared in parts of pre7-4,
    so that the whole kernel compiles, at least on x86 (we build with
    every driver turned on, almost all as modules).

    Adam J. Richter __ ______________ 4880 Stevens Creek Blvd, Suite 104
    adam@yggdrasil.com \ / San Jose, California 95129-1034
    +1 408 261-6630 | g g d r a s i l United States of America
    fax +1 408 261-6631 "Free Software For The Rest Of Us."
    -----------------------------CUT HERE-----------------------------
    --- /tmp/adam/linux-2.3.99-pre6.4/drivers/atm/iphase.c Wed May 3 18:46:45 2000
    +++ linux/drivers/atm/iphase.c Thu May 4 05:44:23 2000
    @@ -3255,8 +3255,8 @@
                     return -ENXIO;
             }
             // MOD_INC_USE_COUNT;
    - ia_timer.next = NULL;
    - ia_timer.prev = NULL;
    + ia_timer.list.next = NULL;
    + ia_timer.list.prev = NULL;
                ia_timer.expires = jiffies + 3*HZ;
                ia_timer.data = 0UL;
                ia_timer.function = ia_led_timer;
    --- /tmp/adam/linux-2.3.99-pre6.4/drivers/isdn/hisax/fsm.c Tue Feb 15 11:40:43 2000
    +++ linux/drivers/isdn/hisax/fsm.c Thu May 4 05:45:13 2000
    @@ -156,7 +156,7 @@
                             (long) ft, millisec, where);
     #endif
     
    - if (ft->tl.next || ft->tl.prev) {
    + if (ft->tl.list.next || ft->tl.list.prev) {
                     printk(KERN_WARNING "FsmAddTimer: timer already active!\n");
                     ft->fi->printdebug(ft->fi, "FsmAddTimer already active!");
                     return -1;
    @@ -180,7 +180,7 @@
                             (long) ft, millisec, where);
     #endif
     
    - if (ft->tl.next || ft->tl.prev)
    + if (ft->tl.list.next || ft->tl.list.prev)
                     del_timer(&ft->tl);
             init_timer(&ft->tl);
             ft->event = event;
    --- /tmp/adam/linux-2.3.99-pre6.4/drivers/isdn/hisax/isdnl3.c Thu Apr 13 09:03:03 2000
    +++ linux/drivers/isdn/hisax/isdnl3.c Thu May 4 05:45:15 2000
    @@ -238,7 +238,7 @@
     L3AddTimer(struct L3Timer *t,
                int millisec, int event)
     {
    - if (t->tl.next || t->tl.prev) {
    + if (t->tl.list.next || t->tl.list.prev) {
                     printk(KERN_WARNING "L3AddTimer: timer already active!\n");
                     return -1;
             }
    --- /tmp/adam/linux-2.3.99-pre6.4/drivers/net/pcmcia/netwave_cs.c Thu Feb 17 09:18:47 2000
    +++ linux/drivers/net/pcmcia/netwave_cs.c Thu May 4 05:45:51 2000
    @@ -501,8 +501,8 @@
     #endif
         dev->do_ioctl = &netwave_ioctl;
     
    + strcpy(dev->name, priv->node.dev_name);
         ether_setup(dev);
    - dev->name = priv->node.dev_name;
         dev->init = &netwave_init;
         dev->open = &netwave_open;
         dev->stop = &netwave_close;
    @@ -1224,7 +1224,7 @@
         writeb(NETWAVE_CMD_EOC, ramBase + NETWAVE_EREG_CB + 3);
             
         /* If watchdog not already active, activate it... */
    - if(priv->watchdog.prev == (struct timer_list *) NULL) {
    + if(priv->watchdog.list.prev == (struct timer_list *) NULL) {
     
             /* set timer to expire in WATCHDOG_JIFFIES */
             priv->watchdog.expires = jiffies + WATCHDOG_JIFFIES;
    --- /tmp/adam/linux-2.3.99-pre6.4/drivers/net/pcmcia/wavelan_cs.c Thu Feb 17 09:18:47 2000
    +++ linux/drivers/net/pcmcia/wavelan_cs.c Thu May 4 05:45:52 2000
    @@ -2926,7 +2926,7 @@
       lp->stats.tx_bytes += length;
     
       /* If watchdog not already active, activate it... */
    - if(lp->watchdog.prev == (timer_list *) NULL)
    + if(lp->watchdog.list.prev == (timer_list *) NULL)
         {
           /* set timer to expire in WATCHDOG_JIFFIES */
           lp->watchdog.expires = jiffies + WATCHDOG_JIFFIES;
    @@ -3655,7 +3655,7 @@
     #endif
     
       /* If watchdog was activated, kill it ! */
    - if(lp->watchdog.prev != (timer_list *) NULL)
    + if(lp->watchdog.list.prev != (timer_list *) NULL)
         del_timer(&lp->watchdog);
     
       lp->nresets++;
    @@ -4061,7 +4061,7 @@
     #endif
     
               /* If watchdog was activated, kill it ! */
    - if(lp->watchdog.prev != (timer_list *) NULL)
    + if(lp->watchdog.list.prev != (timer_list *) NULL)
                 del_timer(&lp->watchdog);
     
               /* Get transmission status */
    @@ -4353,7 +4353,7 @@
     #endif /* WAVELAN_ROAMING */
     
       /* If watchdog was activated, kill it ! */
    - if(lp->watchdog.prev != (timer_list *) NULL)
    + if(lp->watchdog.list.prev != (timer_list *) NULL)
         del_timer(&lp->watchdog);
     
       link->open--;
    @@ -4499,7 +4499,7 @@
     
       /* Other specific data */
       /* Provide storage area for device name */
    - dev->name = ((net_local *)dev->priv)->node.dev_name;
    + strcpy(dev->name, ((net_local *)dev->priv)->node.dev_name);
       netif_start_queue (dev);
       dev->mtu = WAVELAN_MTU;
     
    --- /tmp/adam/linux-2.3.99-pre6.4/net/ax25/ax25_timer.c Thu Jan 20 10:48:35 2000
    +++ linux/net/ax25/ax25_timer.c Thu May 4 05:48:55 2000
    @@ -140,12 +140,13 @@
     
     int ax25_t1timer_running(ax25_cb *ax25)
     {
    - return (ax25->t1timer.prev != NULL || ax25->t1timer.next != NULL);
    + return (ax25->t1timer.list.prev != NULL ||
    + ax25->t1timer.list.next != NULL);
     }
     
     unsigned long ax25_display_timer(struct timer_list *timer)
     {
    - if (timer->prev == NULL && timer->next == NULL)
    + if (timer->list.prev == NULL && timer->list.next == NULL)
                     return 0;
     
             return timer->expires - jiffies;
    --- /tmp/adam/linux-2.3.99-pre6.4/net/lapb/lapb_iface.c Thu Aug 26 14:13:59 1999
    +++ linux/net/lapb/lapb_iface.c Thu May 4 05:49:04 2000
    @@ -196,12 +196,12 @@
             parms->window = lapb->window;
             parms->mode = lapb->mode;
     
    - if (lapb->t1timer.prev == NULL && lapb->t1timer.next == NULL)
    + if (lapb->t1timer.list.prev == NULL && lapb->t1timer.list.next == NULL)
                     parms->t1timer = 0;
             else
                     parms->t1timer = (lapb->t1timer.expires - jiffies) / HZ;
     
    - if (lapb->t2timer.prev == NULL && lapb->t2timer.next == NULL)
    + if (lapb->t2timer.list.prev == NULL && lapb->t2timer.list.next == NULL)
                     parms->t2timer = 0;
             else
                     parms->t2timer = (lapb->t2timer.expires - jiffies) / HZ;
    --- /tmp/adam/linux-2.3.99-pre6.4/net/lapb/lapb_timer.c Mon Jul 7 08:19:59 1997
    +++ linux/net/lapb/lapb_timer.c Thu May 4 05:49:04 2000
    @@ -73,7 +73,8 @@
     
     int lapb_t1timer_running(lapb_cb *lapb)
     {
    - return (lapb->t1timer.prev != NULL || lapb->t1timer.next != NULL);
    + return (lapb->t1timer.list.prev != NULL ||
    + lapb->t1timer.list.next != NULL);
     }
     
     static void lapb_t2timer_expiry(unsigned long param)
    --- /tmp/adam/linux-2.3.99-pre6.4/net/netrom/nr_loopback.c Thu Jan 20 10:48:35 2000
    +++ linux/net/netrom/nr_loopback.c Thu May 4 05:49:05 2000
    @@ -38,7 +38,8 @@
     
     static int nr_loopback_running(void)
     {
    - return (loopback_timer.prev != NULL || loopback_timer.next != NULL);
    + return (loopback_timer.list.prev != NULL ||
    + loopback_timer.list.next != NULL);
     }
     
     int nr_loopback_queue(struct sk_buff *skb)
    --- /tmp/adam/linux-2.3.99-pre6.4/net/netrom/nr_timer.c Mon Jul 7 08:20:00 1997
    +++ linux/net/netrom/nr_timer.c Thu May 4 05:49:05 2000
    @@ -129,8 +129,8 @@
     
     int nr_t1timer_running(struct sock *sk)
     {
    - return (sk->protinfo.nr->t1timer.prev != NULL ||
    - sk->protinfo.nr->t1timer.next != NULL);
    + return (sk->protinfo.nr->t1timer.list.prev != NULL ||
    + sk->protinfo.nr->t1timer.list.next != NULL);
     }
     
     static void nr_heartbeat_expiry(unsigned long param)
    --- /tmp/adam/linux-2.3.99-pre6.4/net/rose/rose_link.c Mon Aug 23 10:01:02 1999
    +++ linux/net/rose/rose_link.c Thu May 4 05:49:05 2000
    @@ -76,12 +76,14 @@
     
     int rose_ftimer_running(struct rose_neigh *neigh)
     {
    - return (neigh->ftimer.prev != NULL || neigh->ftimer.next != NULL);
    + return (neigh->ftimer.list.prev != NULL ||
    + neigh->ftimer.list.next != NULL);
     }
     
     int rose_t0timer_running(struct rose_neigh *neigh)
     {
    - return (neigh->t0timer.prev != NULL || neigh->t0timer.next != NULL);
    + return (neigh->t0timer.list.prev != NULL ||
    + neigh->t0timer.list.next != NULL);
     }
     
     static void rose_ftimer_expiry(unsigned long param)
    --- /tmp/adam/linux-2.3.99-pre6.4/net/rose/rose_loopback.c Wed Aug 18 11:38:49 1999
    +++ linux/net/rose/rose_loopback.c Thu May 4 05:49:05 2000
    @@ -37,7 +37,8 @@
     
     static int rose_loopback_running(void)
     {
    - return (loopback_timer.prev != NULL || loopback_timer.next != NULL);
    + return (loopback_timer.list.prev != NULL ||
    + loopback_timer.list.next != NULL);
     }
     
     int rose_loopback_queue(struct sk_buff *skb, struct rose_neigh *neigh)
    --- /tmp/adam/linux-2.3.99-pre6.4/net/x25/x25_timer.c Mon Jul 7 08:20:00 1997
    +++ linux/net/x25/x25_timer.c Thu May 4 05:49:10 2000
    @@ -111,8 +111,8 @@
     
     unsigned long x25_display_timer(struct sock *sk)
     {
    - if (sk->protinfo.x25->timer.prev == NULL &&
    - sk->protinfo.x25->timer.next == NULL)
    + if (sk->protinfo.x25->timer.list.prev == NULL &&
    + sk->protinfo.x25->timer.list.next == NULL)
                     return 0;
     
             return sk->protinfo.x25->timer.expires - jiffies;

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



    This archive was generated by hypermail 2b29 : Thu May 04 2000 - 12:00:20 EDT