imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,30 +1,27 @@
 void pcbit_fsm_event(struct pcbit_dev *dev, struct pcbit_chan *chan, unsigned short event, struct callb_data *data) {
   struct fsm_entry *action;
   struct fsm_timer_entry *tentry;
   unsigned long flags;
   spin_lock_irqsave(&dev->lock, flags);
   for (action = fsm_table; action->init != 0xff; action++)
     if (action->init == chan->fsm_state && action->event == event) break;
   if (action->init == 0xff) {
     spin_unlock_irqrestore(&dev->lock, flags);
     printk(KERN_DEBUG "fsm error: event %x on state %x\n", event, chan->fsm_state);
     return;
   }
   if (chan->fsm_timer.function) {
     del_timer(&chan->fsm_timer);
     chan->fsm_timer.function = NULL;
   }
   chan->fsm_state = action->final;
   pcbit_state_change(dev, chan, action->init, event, action->final);
   for (tentry = fsm_timers; tentry->init != 0xff; tentry++)
     if (tentry->init == chan->fsm_state) break;
   if (tentry->init != 0xff) {
-    init_timer(&chan->fsm_timer);
-    chan->fsm_timer.function = &pcbit_fsm_timer;
-    chan->fsm_timer.data = (ulong)chan;
-    chan->fsm_timer.expires = jiffies + tentry->timeout * HZ;
-    add_timer(&chan->fsm_timer);
+    setup_timer(&chan->fsm_timer, &pcbit_fsm_timer, (ulong)chan);
+    mod_timer(&chan->fsm_timer, jiffies + tentry->timeout * HZ);
   }
   spin_unlock_irqrestore(&dev->lock, flags);
   if (action->callb) action->callb(dev, chan, data);
 }<sep>@@
expression E0;
expression E1;
expression E2,e2;
@@
- init_timer(&E0);
+ setup_timer(&E0, E1, E2);
  ... when != E0.data = e2;
- E0.function = E1;
  ... when != init_timer(&E0);
- E0.data = E2;



@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,58 +1,56 @@
 static int snd_uart16550_create(struct snd_card *card, unsigned long iobase, int irq, unsigned int speed, unsigned int base, int adaptor, int droponfull, struct snd_uart16550 **ruart) {
   static struct snd_device_ops ops = {
       .dev_free = snd_uart16550_dev_free,
   };
   struct snd_uart16550 *uart;
   int err;
   if ((uart = kzalloc(sizeof(*uart), GFP_KERNEL)) == NULL) return -ENOMEM;
   uart->adaptor = adaptor;
   uart->card = card;
   spin_lock_init(&uart->open_lock);
   uart->irq = -1;
   uart->base = iobase;
   uart->drop_on_full = droponfull;
   if ((err = snd_uart16550_detect(uart)) <= 0) {
     printk(KERN_ERR "no UART detected at 0x%lx\n", iobase);
     snd_uart16550_free(uart);
     return -ENODEV;
   }
   if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
     if (request_irq(irq, snd_uart16550_interrupt, 0, "Serial MIDI", uart)) {
       snd_printk(KERN_WARNING "irq %d busy. Using Polling.\n", irq);
     } else {
       uart->irq = irq;
     }
   }
   uart->divisor = base / speed;
   uart->speed = base / (unsigned int)uart->divisor;
   uart->speed_base = base;
   uart->prev_out = -1;
   uart->prev_in = 0;
   uart->rstatus = 0;
   memset(uart->prev_status, 0x80, sizeof(unsigned char) * SNDRV_SERIAL_MAX_OUTS);
-  init_timer(&uart->buffer_timer);
-  uart->buffer_timer.function = snd_uart16550_buffer_timer;
-  uart->buffer_timer.data = (unsigned long)uart;
+  setup_timer(&uart->buffer_timer, snd_uart16550_buffer_timer, (unsigned long)uart);
   uart->timer_running = 0;
   /* Register device */
   if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, uart, &ops)) < 0) {
     snd_uart16550_free(uart);
     return err;
   }
   switch (uart->adaptor) {
   case SNDRV_SERIAL_MS124W_SA:
   case SNDRV_SERIAL_MS124W_MB:
     /* MS-124W can draw power from RTS and DTR if they
        are in opposite states. */
     outb(UART_MCR_RTS | (0 & UART_MCR_DTR), uart->base + UART_MCR);
     break;
   case SNDRV_SERIAL_MS124T:
     /* MS-124T can draw power from RTS and/or DTR (preferably
        both) if they are asserted. */
     outb(UART_MCR_RTS | UART_MCR_DTR, uart->base + UART_MCR);
     break;
   default: break;
   }
   if (ruart) *ruart = uart;
   return 0;
 }<sep>@@
expression E0;
expression E1;
expression E2,e2;
@@
- init_timer(&E0);
+ setup_timer(&E0, E1, E2);
  ... when != E0.data = e2;
- E0.function = E1;
  ... when != init_timer(&E0);
- E0.data = E2;
--- initial
+++ final
@@ -1,18 +1,17 @@
 void snd_ak4117_reinit(struct ak4117 *chip) {
   unsigned char old = chip->regmap[AK4117_REG_PWRDN], reg;
   del_timer(&chip->timer);
   chip->init = 1;
   /* bring the chip to reset state and powerdown state */
   reg_write(chip, AK4117_REG_PWRDN, 0);
   udelay(200);
   /* release reset, but leave powerdown */
   reg_write(chip, AK4117_REG_PWRDN, (old | AK4117_RST) & ~AK4117_PWN);
   udelay(200);
   for (reg = 1; reg < 5; reg++)
     reg_write(chip, reg, chip->regmap[reg]);
   /* release powerdown, everything is initialized now */
   reg_write(chip, AK4117_REG_PWRDN, old | AK4117_RST | AK4117_PWN);
   chip->init = 0;
-  chip->timer.expires = 1 + jiffies;
-  add_timer(&chip->timer);
+  mod_timer(&chip->timer, 1 + jiffies);
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,12 +1,11 @@
 static void hsr_check_announce(struct net_device *hsr_dev, unsigned char old_operstate) {
   struct hsr_priv *hsr;
   hsr = netdev_priv(hsr_dev);
   if ((hsr_dev->operstate == IF_OPER_UP) && (old_operstate != IF_OPER_UP)) {
     /* Went up */
     hsr->announce_count = 0;
-    hsr->announce_timer.expires = jiffies + msecs_to_jiffies(HSR_ANNOUNCE_INTERVAL);
-    add_timer(&hsr->announce_timer);
+    mod_timer(&hsr->announce_timer, jiffies + msecs_to_jiffies(HSR_ANNOUNCE_INTERVAL));
   }
   if ((hsr_dev->operstate != IF_OPER_UP) && (old_operstate == IF_OPER_UP)) /* Went down */
     del_timer(&hsr->announce_timer);
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,80 +1,79 @@
 static void icn_polldchan(unsigned long data) {
   icn_card *card = (icn_card *)data;
   int mch = card->secondhalf ? 2 : 0;
   int avail = 0;
   int left;
   u_char c;
   int ch;
   unsigned long flags;
   int i;
   u_char *p;
   isdn_ctrl cmd;
   if (icn_trymaplock_channel(card, mch)) {
     avail = msg_avail;
     for (left = avail, i = readb(&msg_o); left > 0; i++, left--) {
       c = readb(&dev.shmem->comm_buffers.iopc_buf[i & 0xff]);
       icn_putmsg(card, c);
       if (c == 0xff) {
         card->imsg[card->iptr] = 0;
         card->iptr = 0;
         if (card->imsg[0] == '0' && card->imsg[1] >= '0' && card->imsg[1] <= '2' && card->imsg[2] == ';') {
           ch = (card->imsg[1] - '0') - 1;
           p = &card->imsg[3];
           icn_parse_status(p, ch, card);
         } else {
           p = card->imsg;
           if (!strncmp(p, "DRV1.", 5)) {
             u_char vstr[10];
             u_char *q = vstr;
             printk(KERN_INFO "icn: (%s) %s\n", CID, p);
             if (!strncmp(p + 7, "TC", 2)) {
               card->ptype = ISDN_PTYPE_1TR6;
               card->interface.features |= ISDN_FEATURE_P_1TR6;
               printk(KERN_INFO "icn: (%s) 1TR6-Protocol loaded and running\n", CID);
             }
             if (!strncmp(p + 7, "EC", 2)) {
               card->ptype = ISDN_PTYPE_EURO;
               card->interface.features |= ISDN_FEATURE_P_EURO;
               printk(KERN_INFO "icn: (%s) Euro-Protocol loaded and running\n", CID);
             }
             p = strstr(card->imsg, "BRV") + 3;
             while (*p) {
               if (*p >= '0' && *p <= '9') *q++ = *p;
               p++;
             }
             *q = '\0';
             strcat(vstr, "000");
             vstr[3] = '\0';
             card->fw_rev = (int)simple_strtoul(vstr, NULL, 10);
             continue;
           }
         }
       } else {
         card->imsg[card->iptr] = c;
         if (card->iptr < 59) card->iptr++;
       }
     }
     writeb((readb(&msg_o) + avail) & 0xff, &msg_o);
     icn_release_channel();
   }
   if (avail) {
     cmd.command = ISDN_STAT_STAVAIL;
     cmd.driver = card->myid;
     cmd.arg = avail;
     card->interface.statcallb(&cmd);
   }
   spin_lock_irqsave(&card->lock, flags);
   if (card->flags & (ICN_FLAGS_B1ACTIVE | ICN_FLAGS_B2ACTIVE))
     if (!(card->flags & ICN_FLAGS_RBTIMER)) {
       /* schedule b-channel polling */
       card->flags |= ICN_FLAGS_RBTIMER;
       del_timer(&card->rb_timer);
       card->rb_timer.function = icn_pollbchan;
       card->rb_timer.data = (unsigned long)card;
-      card->rb_timer.expires = jiffies + ICN_TIMER_BCREAD;
-      add_timer(&card->rb_timer);
+      mod_timer(&card->rb_timer, jiffies + ICN_TIMER_BCREAD);
     }
   /* schedule again */
   mod_timer(&card->st_timer, jiffies + ICN_TIMER_DCREAD);
   spin_unlock_irqrestore(&card->lock, flags);
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,41 +1,38 @@
 static int toneport_try_init(struct usb_interface *interface, struct usb_line6 *line6) {
   int err;
   struct usb_line6_toneport *toneport = (struct usb_line6_toneport *)line6;
   if ((interface == NULL) || (toneport == NULL)) return -ENODEV;
   line6->disconnect = line6_toneport_disconnect;
   /* initialize audio system: */
   err = line6_init_audio(line6);
   if (err < 0) return err;
   /* initialize PCM subsystem: */
   err = line6_init_pcm(line6, &toneport_pcm_properties);
   if (err < 0) return err;
   /* register monitor control: */
   err = snd_ctl_add(line6->card, snd_ctl_new1(&toneport_control_monitor, line6->line6pcm));
   if (err < 0) return err;
   /* register source select control: */
   switch (line6->type) {
   case LINE6_TONEPORT_UX1:
   case LINE6_TONEPORT_UX2:
   case LINE6_PODSTUDIO_UX1:
   case LINE6_PODSTUDIO_UX2:
     err = snd_ctl_add(line6->card, snd_ctl_new1(&toneport_control_source, line6->line6pcm));
     if (err < 0) return err;
   default: break;
   }
   /* register audio system: */
   err = line6_register_audio(line6);
   if (err < 0) return err;
   line6_read_serial_number(line6, &toneport->serial_number);
   line6_read_data(line6, 0x80c2, &toneport->firmware_version, 1);
   if (toneport_has_led(line6->type)) {
     CHECK_RETURN(device_create_file(&interface->dev, &dev_attr_led_red));
     CHECK_RETURN(device_create_file(&interface->dev, &dev_attr_led_green));
   }
   toneport_setup(toneport);
-  init_timer(&toneport->timer);
-  toneport->timer.expires = jiffies + TONEPORT_PCM_DELAY * HZ;
-  toneport->timer.function = toneport_start_pcm;
-  toneport->timer.data = (unsigned long)toneport;
-  add_timer(&toneport->timer);
+  setup_timer(&toneport->timer, toneport_start_pcm, (unsigned long)toneport);
+  mod_timer(&toneport->timer, jiffies + TONEPORT_PCM_DELAY * HZ);
   return 0;
 }<sep>@@
expression E0;
expression E1;
expression E2,e2;
@@
- init_timer(&E0);
+ setup_timer(&E0, E1, E2);
  ... when != E0.data = e2;
- E0.function = E1;
  ... when != init_timer(&E0);
- E0.data = E2;



@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,8 +1,7 @@
 static inline void snd_uart16550_add_timer(struct snd_uart16550 *uart) {
   if (!uart->timer_running) {
     /* timer 38600bps * 10bit * 16byte */
-    uart->buffer_timer.expires = jiffies + (HZ + 255) / 256;
     uart->timer_running = 1;
-    add_timer(&uart->buffer_timer);
+    mod_timer(&uart->buffer_timer, jiffies + (HZ + 255) / 256);
   }
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,10 +1,9 @@
 static void snd_mpu401_uart_timer(unsigned long data) {
   struct snd_mpu401 *mpu = (struct snd_mpu401 *)data;
   unsigned long flags;
   spin_lock_irqsave(&mpu->timer_lock, flags);
   /*mpu->mode |= MPU401_MODE_TIMER;*/
-  mpu->timer.expires = 1 + jiffies;
-  add_timer(&mpu->timer);
+  mod_timer(&mpu->timer, 1 + jiffies);
   spin_unlock_irqrestore(&mpu->timer_lock, flags);
   if (mpu->rmidi) _snd_mpu401_uart_interrupt(mpu);
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,10 +1,9 @@
 static void snd_card_asihpi_pcm_timer_start(struct snd_pcm_substream *substream) {
   struct snd_pcm_runtime *runtime = substream->runtime;
   struct snd_card_asihpi_pcm *dpcm = runtime->private_data;
   int expiry;
   expiry = HZ / 200;
   expiry = max(expiry, 1); /* don't let it be zero! */
-  dpcm->timer.expires = jiffies + expiry;
   dpcm->respawn_timer = 1;
-  add_timer(&dpcm->timer);
+  mod_timer(&dpcm->timer, jiffies + expiry);
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,36 +1,33 @@
 static int set_protocol_running(struct pcbit_dev *dev) {
   isdn_ctrl ctl;
-  init_timer(&dev->set_running_timer);
-  dev->set_running_timer.function = &set_running_timeout;
-  dev->set_running_timer.data = (ulong)dev;
-  dev->set_running_timer.expires = jiffies + SET_RUN_TIMEOUT;
+  setup_timer(&dev->set_running_timer, &set_running_timeout, (ulong)dev);
   /* kick it */
   dev->l2_state = L2_STARTING;
   writeb((0x80U | ((dev->rcv_seq & 0x07) << 3) | (dev->send_seq & 0x07)), dev->sh_mem + BANK4);
-  add_timer(&dev->set_running_timer);
+  mod_timer(&dev->set_running_timer, jiffies + SET_RUN_TIMEOUT);
   wait_event(dev->set_running_wq, dev->l2_state == L2_RUNNING || dev->l2_state == L2_DOWN);
   del_timer(&dev->set_running_timer);
   if (dev->l2_state == L2_RUNNING) {
     printk(KERN_DEBUG "pcbit: running\n");
     dev->unack_seq = dev->send_seq;
     dev->writeptr = dev->sh_mem;
     dev->readptr = dev->sh_mem + BANK2;
     /* tell the good news to the upper layer */
     ctl.driver = dev->id;
     ctl.command = ISDN_STAT_RUN;
     dev->dev_if->statcallb(&ctl);
   } else {
     printk(KERN_DEBUG "pcbit: initialization failed\n");
     printk(KERN_DEBUG "pcbit: firmware not loaded\n");
 #ifdef DEBUG
     printk(KERN_DEBUG "Bank3 = %02x\n", readb(dev->sh_mem + BANK3));
 #endif
     writeb(0x40, dev->sh_mem + BANK4);
     /* warn the upper layer */
     ctl.driver = dev->id;
     ctl.command = ISDN_STAT_STOP;
     dev->dev_if->statcallb(&ctl);
     return -EL2HLT; /* Level 2 halted */
   }
   return 0;
 }<sep>@@
expression E0;
expression E1;
expression E2,e2;
@@
- init_timer(&E0);
+ setup_timer(&E0, E1, E2);
  ... when != E0.data = e2;
- E0.function = E1;
  ... when != init_timer(&E0);
- E0.data = E2;



@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,67 +1,65 @@
 static void media_check(unsigned long arg) {
   struct net_device *dev = (struct net_device *)(arg);
   struct el3_private *lp = netdev_priv(dev);
   unsigned int ioaddr = dev->base_addr;
   u16 media, errs;
   unsigned long flags;
   if (!netif_device_present(dev)) goto reschedule;
   /* Check for pending interrupt with expired latency timer: with
    * this, we can limp along even if the interrupt is blocked
    */
   if ((inw(ioaddr + EL3_STATUS) & IntLatch) && (inb(ioaddr + EL3_TIMER) == 0xff)) {
     if (!lp->fast_poll) netdev_warn(dev, "interrupt(s) dropped!\n");
     local_irq_save(flags);
     el3_interrupt(dev->irq, dev);
     local_irq_restore(flags);
     lp->fast_poll = HZ;
   }
   if (lp->fast_poll) {
     lp->fast_poll--;
-    lp->media.expires = jiffies + HZ / 100;
-    add_timer(&lp->media);
+    mod_timer(&lp->media, jiffies + HZ / 100);
     return;
   }
   /* lp->lock guards the EL3 window. Window should always be 1 except
    * when the lock is held
    */
   spin_lock_irqsave(&lp->lock, flags);
   EL3WINDOW(4);
   media = inw(ioaddr + WN4_MEDIA) & 0xc810;
   /* Ignore collisions unless we've had no irq's recently */
   if (time_before(jiffies, lp->last_irq + HZ)) {
     media &= ~0x0010;
   } else {
     /* Try harder to detect carrier errors */
     EL3WINDOW(6);
     outw(StatsDisable, ioaddr + EL3_CMD);
     errs = inb(ioaddr + 0);
     outw(StatsEnable, ioaddr + EL3_CMD);
     dev->stats.tx_carrier_errors += errs;
     if (errs || (lp->media_status & 0x0010)) media |= 0x0010;
   }
   if (media != lp->media_status) {
     if ((media & lp->media_status & 0x8000) && ((lp->media_status ^ media) & 0x0800))
       netdev_info(dev, "%s link beat\n", (lp->media_status & 0x0800 ? "lost" : "found"));
     else if ((media & lp->media_status & 0x4000) && ((lp->media_status ^ media) & 0x0010))
       netdev_info(dev, "coax cable %s\n", (lp->media_status & 0x0010 ? "ok" : "problem"));
     if (dev->if_port == 0) {
       if (media & 0x8000) {
         if (media & 0x0800)
           netdev_info(dev, "flipped to 10baseT\n");
         else
           tc589_set_xcvr(dev, 2);
       } else if (media & 0x4000) {
         if (media & 0x0010)
           tc589_set_xcvr(dev, 1);
         else
           netdev_info(dev, "flipped to 10base2\n");
       }
     }
     lp->media_status = media;
   }
   EL3WINDOW(1);
   spin_unlock_irqrestore(&lp->lock, flags);
 reschedule:
-  lp->media.expires = jiffies + HZ;
-  add_timer(&lp->media);
+  mod_timer(&lp->media, jiffies + HZ);
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,73 +1,71 @@
 static void ei_watchdog(u_long arg) {
   struct net_device *dev = (struct net_device *)arg;
   struct pcnet_dev *info = PRIV(dev);
   unsigned int nic_base = dev->base_addr;
   unsigned int mii_addr = nic_base + DLINK_GPIO;
   u_short link;
   if (!netif_device_present(dev)) goto reschedule;
   /* Check for pending interrupt with expired latency timer: with
      this, we can limp along even if the interrupt is blocked */
   if (info->stale++ && (inb_p(nic_base + EN0_ISR) & ENISR_ALL)) {
     if (!info->fast_poll) netdev_info(dev, "interrupt(s) dropped!\n");
     ei_irq_wrapper(dev->irq, dev);
     info->fast_poll = HZ;
   }
   if (info->fast_poll) {
     info->fast_poll--;
-    info->watchdog.expires = jiffies + 1;
-    add_timer(&info->watchdog);
+    mod_timer(&info->watchdog, jiffies + 1);
     return;
   }
   if (!(info->flags & HAS_MII)) goto reschedule;
   mdio_read(mii_addr, info->phy_id, 1);
   link = mdio_read(mii_addr, info->phy_id, 1);
   if (!link || (link == 0xffff)) {
     if (info->eth_phy) {
       info->phy_id = info->eth_phy = 0;
     } else {
       netdev_info(dev, "MII is missing!\n");
       info->flags &= ~HAS_MII;
     }
     goto reschedule;
   }
   link &= 0x0004;
   if (link != info->link_status) {
     u_short p = mdio_read(mii_addr, info->phy_id, 5);
     netdev_info(dev, "%s link beat\n", link ? "found" : "lost");
     if (link && (info->flags & IS_DL10022)) {
       /* Disable collision detection on full duplex links */
       outb((p & 0x0140) ? 4 : 0, nic_base + DLINK_DIAG);
     } else if (link && (info->flags & IS_DL10019)) {
       /* Disable collision detection on full duplex links */
       write_asic(dev->base_addr, 4, (p & 0x140) ? DL19FDUPLX : 0);
     }
     if (link) {
       if (info->phy_id == info->eth_phy) {
         if (p)
           netdev_info(dev,
                       "autonegotiation complete: "
                       "%sbaseT-%cD selected\n",
                       ((p & 0x0180) ? "100" : "10"), ((p & 0x0140) ? 'F' : 'H'));
         else
           netdev_info(dev, "link partner did not autonegotiate\n");
       }
       NS8390_init(dev, 1);
     }
     info->link_status = link;
   }
   if (info->pna_phy && time_after(jiffies, info->mii_reset + 6 * HZ)) {
     link = mdio_read(mii_addr, info->eth_phy, 1) & 0x0004;
     if (((info->phy_id == info->pna_phy) && link) || ((info->phy_id != info->pna_phy) && !link)) {
       /* isolate this MII and try flipping to the other one */
       mdio_write(mii_addr, info->phy_id, 0, 0x0400);
       info->phy_id ^= info->pna_phy ^ info->eth_phy;
       netdev_info(dev, "switched to %s transceiver\n", (info->phy_id == info->eth_phy) ? "ethernet" : "PNA");
       mdio_write(mii_addr, info->phy_id, 0, (info->phy_id == info->eth_phy) ? 0x1000 : 0);
       info->link_status = 0;
       info->mii_reset = jiffies;
     }
   }
 reschedule:
-  info->watchdog.expires = jiffies + HZ;
-  add_timer(&info->watchdog);
+  mod_timer(&info->watchdog, jiffies + HZ);
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,12 +1,9 @@
 static void fbcon_add_cursor_timer(struct fb_info *info) {
   struct fbcon_ops *ops = info->fbcon_par;
   if ((!info->queue.func || info->queue.func == fb_flashcursor) && !(ops->flags & FBCON_FLAGS_CURSOR_TIMER) && !fbcon_cursor_noblink) {
     if (!info->queue.func) INIT_WORK(&info->queue, fb_flashcursor);
-    init_timer(&ops->cursor_timer);
-    ops->cursor_timer.function = cursor_timer_handler;
-    ops->cursor_timer.expires = jiffies + ops->cur_blink_jiffies;
-    ops->cursor_timer.data = (unsigned long)info;
-    add_timer(&ops->cursor_timer);
+    setup_timer(&ops->cursor_timer, cursor_timer_handler, (unsigned long)info);
+    mod_timer(&ops->cursor_timer, jiffies + ops->cur_blink_jiffies);
     ops->flags |= FBCON_FLAGS_CURSOR_TIMER;
   }
 }<sep>@@
expression E0;
expression E1;
expression E2,e2;
@@
- init_timer(&E0);
+ setup_timer(&E0, E1, E2);
  ... when != E0.data = e2;
- E0.function = E1;
  ... when != init_timer(&E0);
- E0.data = E2;



@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,29 +1,28 @@
 static void start_voice(struct snd_emu8k_pcm *rec, int ch) {
   unsigned long flags;
   struct snd_emu8000 *hw = rec->emu;
   unsigned int temp, aux;
   int pt = calc_pitch_target(rec->pitch);
   /* cutoff and volume */
   EMU8000_IFATN_WRITE(hw, ch, 0xff00);
   EMU8000_VTFT_WRITE(hw, ch, 0xffff);
   EMU8000_CVCF_WRITE(hw, ch, 0xffff);
   /* trigger envelope */
   EMU8000_DCYSUSV_WRITE(hw, ch, 0x7f7f);
   /* set reverb and pitch target */
   temp = 0; // reverb
   if (rec->panning[ch] == 0)
     aux = 0xff;
   else
     aux = (-rec->panning[ch]) & 0xff;
   temp = (temp << 8) | (pt << 16) | aux;
   EMU8000_PTRX_WRITE(hw, ch, temp);
   EMU8000_CPF_WRITE(hw, ch, pt << 16);
   /* start timer */
   spin_lock_irqsave(&rec->timer_lock, flags);
   if (!rec->timer_running) {
-    rec->timer.expires = jiffies + 1;
-    add_timer(&rec->timer);
+    mod_timer(&rec->timer, jiffies + 1);
     rec->timer_running = 1;
   }
   spin_unlock_irqrestore(&rec->timer_lock, flags);
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,6 +1,5 @@
 static void yenta_interrupt_wrapper(unsigned long data) {
   struct yenta_socket *socket = (struct yenta_socket *)data;
   yenta_interrupt(0, (void *)socket);
-  socket->poll_timer.expires = jiffies + HZ;
-  add_timer(&socket->poll_timer);
+  mod_timer(&socket->poll_timer, jiffies + HZ);
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,9 +1,6 @@
 static void stmmac_init_tx_coalesce(struct stmmac_priv *priv) {
   priv->tx_coal_frames = STMMAC_TX_FRAMES;
   priv->tx_coal_timer = STMMAC_COAL_TX_TIMER;
-  init_timer(&priv->txtimer);
-  priv->txtimer.expires = STMMAC_COAL_TIMER(priv->tx_coal_timer);
-  priv->txtimer.data = (unsigned long)priv;
-  priv->txtimer.function = stmmac_tx_timer;
-  add_timer(&priv->txtimer);
+  setup_timer(&priv->txtimer, stmmac_tx_timer, (unsigned long)priv);
+  mod_timer(&priv->txtimer, STMMAC_COAL_TIMER(priv->tx_coal_timer));
 }<sep>@@
expression E0;
expression E1,e1;
expression E2;
@@
- init_timer(&E0);
+ setup_timer(&E0, E1, E2);
  ... when != E0.function = e1;
- E0.data = E2;
  ... when != init_timer(&E0);
- E0.function = E1;

@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);