imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,83 +1,81 @@
 static int bcm_enetsw_probe(struct platform_device *pdev) {
   struct bcm_enet_priv *priv;
   struct net_device *dev;
   struct bcm63xx_enetsw_platform_data *pd;
   struct resource *res_mem;
   int ret, irq_rx, irq_tx;
   /* stop if shared driver failed, assume driver->probe will be
    * called in the same order we register devices (correct ?)
    */
   if (!bcm_enet_shared_base[0]) return -ENODEV;
   res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
   irq_rx = platform_get_irq(pdev, 0);
   irq_tx = platform_get_irq(pdev, 1);
   if (!res_mem || irq_rx < 0) return -ENODEV;
   ret = 0;
   dev = alloc_etherdev(sizeof(*priv));
   if (!dev) return -ENOMEM;
   priv = netdev_priv(dev);
   memset(priv, 0, sizeof(*priv));
   /* initialize default and fetch platform data */
   priv->enet_is_sw = true;
   priv->irq_rx = irq_rx;
   priv->irq_tx = irq_tx;
   priv->rx_ring_size = BCMENET_DEF_RX_DESC;
   priv->tx_ring_size = BCMENET_DEF_TX_DESC;
   priv->dma_maxburst = BCMENETSW_DMA_MAXBURST;
   pd = dev_get_platdata(&pdev->dev);
   if (pd) {
     memcpy(dev->dev_addr, pd->mac_addr, ETH_ALEN);
     memcpy(priv->used_ports, pd->used_ports, sizeof(pd->used_ports));
     priv->num_ports = pd->num_ports;
     priv->dma_has_sram = pd->dma_has_sram;
     priv->dma_chan_en_mask = pd->dma_chan_en_mask;
     priv->dma_chan_int_mask = pd->dma_chan_int_mask;
     priv->dma_chan_width = pd->dma_chan_width;
   }
   ret = bcm_enet_change_mtu(dev, dev->mtu);
   if (ret) goto out;
   if (!request_mem_region(res_mem->start, resource_size(res_mem), "bcm63xx_enetsw")) {
     ret = -EBUSY;
     goto out;
   }
   priv->base = ioremap(res_mem->start, resource_size(res_mem));
   if (priv->base == NULL) {
     ret = -ENOMEM;
     goto out_release_mem;
   }
   priv->mac_clk = clk_get(&pdev->dev, "enetsw");
   if (IS_ERR(priv->mac_clk)) {
     ret = PTR_ERR(priv->mac_clk);
     goto out_unmap;
   }
   clk_enable(priv->mac_clk);
   priv->rx_chan = 0;
   priv->tx_chan = 1;
   spin_lock_init(&priv->rx_lock);
   /* init rx timeout (used for oom) */
-  init_timer(&priv->rx_timeout);
-  priv->rx_timeout.function = bcm_enet_refill_rx_timer;
-  priv->rx_timeout.data = (unsigned long)dev;
+  setup_timer(&priv->rx_timeout, bcm_enet_refill_rx_timer, (unsigned long)dev);
   /* register netdevice */
   dev->netdev_ops = &bcm_enetsw_ops;
   netif_napi_add(dev, &priv->napi, bcm_enet_poll, 16);
   dev->ethtool_ops = &bcm_enetsw_ethtool_ops;
   SET_NETDEV_DEV(dev, &pdev->dev);
   spin_lock_init(&priv->enetsw_mdio_lock);
   ret = register_netdev(dev);
   if (ret) goto out_put_clk;
   netif_carrier_off(dev);
   platform_set_drvdata(pdev, dev);
   priv->pdev = pdev;
   priv->net_dev = dev;
   return 0;
 out_put_clk:
   clk_put(priv->mac_clk);
 out_unmap:
   iounmap(priv->base);
 out_release_mem:
   release_mem_region(res_mem->start, resource_size(res_mem));
 out:
   free_netdev(dev);
   return ret;
 }<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,15 +1,14 @@
 static void snd_mtpav_output_timer(unsigned long data) {
   unsigned long flags;
   struct mtpav *chip = (struct mtpav *)data;
   int p;
   spin_lock_irqsave(&chip->spinlock, flags);
   /* reprogram timer */
-  chip->timer.expires = 1 + jiffies;
-  add_timer(&chip->timer);
+  mod_timer(&chip->timer, 1 + jiffies);
   /* process each port */
   for (p = 0; p <= chip->num_ports * 2 + MTPAV_PIDX_BROADCAST; p++) {
     struct mtpav_port *portp = &chip->ports[p];
     if ((portp->mode & MTPAV_MODE_OUTPUT_TRIGGERED) && portp->output) snd_mtpav_output_port_write(chip, portp, portp->output);
   }
   spin_unlock_irqrestore(&chip->spinlock, flags);
 }<sep>@@
expression E0,v;
@@

-	E0.expires = v;
	...
-	add_timer(&E0);
+	mod_timer(&E0, v);
--- initial
+++ final
@@ -1,51 +1,46 @@
 int hsr_dev_finalize(struct net_device *hsr_dev, struct net_device *slave[2], unsigned char multicast_spec, u8 protocol_version) {
   struct hsr_priv *hsr;
   struct hsr_port *port;
   int res;
   hsr = netdev_priv(hsr_dev);
   INIT_LIST_HEAD(&hsr->ports);
   INIT_LIST_HEAD(&hsr->node_db);
   INIT_LIST_HEAD(&hsr->self_node_db);
   ether_addr_copy(hsr_dev->dev_addr, slave[0]->dev_addr);
   /* Make sure we recognize frames from ourselves in hsr_rcv() */
   res = hsr_create_self_node(&hsr->self_node_db, hsr_dev->dev_addr, slave[1]->dev_addr);
   if (res < 0) return res;
   spin_lock_init(&hsr->seqnr_lock);
   /* Overflow soon to find bugs easier: */
   hsr->sequence_nr = HSR_SEQNR_START;
   hsr->sup_sequence_nr = HSR_SUP_SEQNR_START;
-  init_timer(&hsr->announce_timer);
-  hsr->announce_timer.function = hsr_announce;
-  hsr->announce_timer.data = (unsigned long)hsr;
-  init_timer(&hsr->prune_timer);
-  hsr->prune_timer.function = hsr_prune_nodes;
-  hsr->prune_timer.data = (unsigned long)hsr;
+  setup_timer(&hsr->announce_timer, hsr_announce, (unsigned long)hsr);
+  setup_timer(&hsr->prune_timer, hsr_prune_nodes, (unsigned long)hsr);
   ether_addr_copy(hsr->sup_multicast_addr, def_multicast_addr);
   hsr->sup_multicast_addr[ETH_ALEN - 1] = multicast_spec;
   hsr->protVersion = protocol_version;
   /* FIXME: should I modify the value of these?
    *
    * - hsr_dev->flags - i.e.
    *			IFF_MASTER/SLAVE?
    * - hsr_dev->priv_flags - i.e.
    *			IFF_EBRIDGE?
    *			IFF_TX_SKB_SHARING?
    *			IFF_HSR_MASTER/SLAVE?
    */
   /* Make sure the 1st call to netif_carrier_on() gets through */
   netif_carrier_off(hsr_dev);
   res = hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER);
   if (res) return res;
   res = register_netdevice(hsr_dev);
   if (res) goto fail;
   res = hsr_add_port(hsr, slave[0], HSR_PT_SLAVE_A);
   if (res) goto fail;
   res = hsr_add_port(hsr, slave[1], HSR_PT_SLAVE_B);
   if (res) goto fail;
-  hsr->prune_timer.expires = jiffies + msecs_to_jiffies(PRUNE_PERIOD);
-  add_timer(&hsr->prune_timer);
+  mod_timer(&hsr->prune_timer, jiffies + msecs_to_jiffies(PRUNE_PERIOD));
   return 0;
 fail:
   hsr_for_each_port(hsr, port) hsr_del_port(port);
   return res;
 }<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,45 +1,43 @@
 static void ei_watchdog(u_long arg) {
   struct net_device *dev = (struct net_device *)(arg);
   struct axnet_dev *info = PRIV(dev);
   unsigned int nic_base = dev->base_addr;
   unsigned int mii_addr = nic_base + AXNET_MII_EEP;
   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->phy_id < 0) goto reschedule;
   link = mdio_read(mii_addr, info->phy_id, 1);
   if (!link || (link == 0xffff)) {
     netdev_info(dev, "MII is missing!\n");
     info->phy_id = -1;
     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->duplex_flag = (p & 0x0140) ? 0x80 : 0x00;
       if (p)
         netdev_info(dev, "autonegotiation complete: %dbaseT-%cD selected\n", (p & 0x0180) ? 100 : 10, (p & 0x0140) ? 'F' : 'H');
       else
         netdev_info(dev, "link partner did not autonegotiate\n");
       AX88190_init(dev, 1);
     }
     info->link_status = link;
   }
 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,20 +1,17 @@
 static void snd_hdspm_midi_output_trigger(struct snd_rawmidi_substream *substream, int up) {
   struct hdspm_midi *hmidi;
   unsigned long flags;
   hmidi = substream->rmidi->private_data;
   spin_lock_irqsave(&hmidi->lock, flags);
   if (up) {
     if (!hmidi->istimer) {
-      init_timer(&hmidi->timer);
-      hmidi->timer.function = snd_hdspm_midi_output_timer;
-      hmidi->timer.data = (unsigned long)hmidi;
-      hmidi->timer.expires = 1 + jiffies;
-      add_timer(&hmidi->timer);
+      setup_timer(&hmidi->timer, snd_hdspm_midi_output_timer, (unsigned long)hmidi);
+      mod_timer(&hmidi->timer, 1 + jiffies);
       hmidi->istimer++;
     }
   } else {
     if (hmidi->istimer && --hmidi->istimer <= 0) del_timer(&hmidi->timer);
   }
   spin_unlock_irqrestore(&hmidi->lock, flags);
   if (up) snd_hdspm_midi_output_write(hmidi);
 }<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,17 +1,17 @@
 void afs_send_empty_reply(struct afs_call *call) {
   struct afs_net *net = call->net;
   struct msghdr msg;
   _enter("");
   rxrpc_kernel_set_tx_length(net->socket, call->rxcall, 0);
   msg.msg_name = NULL;
   msg.msg_namelen = 0;
-  iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, NULL, 0, 0);
+  iov_iter_kvec(&msg.msg_iter, WRITE, NULL, 0, 0);
   msg.msg_control = NULL;
   msg.msg_controllen = 0;
   msg.msg_flags = 0;
   switch (rxrpc_kernel_send_data(net->socket, call->rxcall, &msg, 0, afs_notify_end_reply_tx)) {
   case 0: _leave(" [replied]"); return;
   case -ENOMEM: _debug("oom"); rxrpc_kernel_abort_call(net->socket, call->rxcall, RX_USER_ABORT, -ENOMEM, "KOO");
   default: _leave(" [error]"); return;
   }
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,6 +1,6 @@
 int cifs_read_page_from_socket(struct TCP_Server_Info *server, struct page *page, unsigned int page_offset, unsigned int to_read) {
   struct msghdr smb_msg;
   struct bio_vec bv = {.bv_page = page, .bv_len = to_read, .bv_offset = page_offset};
-  iov_iter_bvec(&smb_msg.msg_iter, READ | ITER_BVEC, &bv, 1, to_read);
+  iov_iter_bvec(&smb_msg.msg_iter, READ, &bv, 1, to_read);
   return cifs_readv_from_socket(server, &smb_msg);
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_bvec(e1,
-                              ITER_BVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,35 +1,35 @@
 static void sbefifo_collect_async_ffdc(struct sbefifo *sbefifo) {
   struct device *dev = &sbefifo->fsi_dev->dev;
   struct iov_iter ffdc_iter;
   struct kvec ffdc_iov;
   __be32 *ffdc;
   size_t ffdc_sz;
   __be32 cmd[2];
   int rc;
   sbefifo->async_ffdc = false;
   ffdc = vmalloc(SBEFIFO_MAX_FFDC_SIZE);
   if (!ffdc) {
     dev_err(dev, "Failed to allocate SBE FFDC buffer\n");
     return;
   }
   ffdc_iov.iov_base = ffdc;
   ffdc_iov.iov_len = SBEFIFO_MAX_FFDC_SIZE;
-  iov_iter_kvec(&ffdc_iter, WRITE | ITER_KVEC, &ffdc_iov, 1, SBEFIFO_MAX_FFDC_SIZE);
+  iov_iter_kvec(&ffdc_iter, WRITE, &ffdc_iov, 1, SBEFIFO_MAX_FFDC_SIZE);
   cmd[0] = cpu_to_be32(2);
   cmd[1] = cpu_to_be32(SBEFIFO_CMD_GET_SBE_FFDC);
   rc = sbefifo_do_command(sbefifo, cmd, 2, &ffdc_iter);
   if (rc != 0) {
     dev_err(dev, "Error %d retrieving SBE FFDC\n", rc);
     goto bail;
   }
   ffdc_sz = SBEFIFO_MAX_FFDC_SIZE - iov_iter_count(&ffdc_iter);
   ffdc_sz /= sizeof(__be32);
   rc = sbefifo_parse_status(dev, SBEFIFO_CMD_GET_SBE_FFDC, ffdc, ffdc_sz, &ffdc_sz);
   if (rc != 0) {
     dev_err(dev, "Error %d decoding SBE FFDC\n", rc);
     goto bail;
   }
   if (ffdc_sz > 0) sbefifo_dump_ffdc(dev, ffdc, ffdc_sz, true);
 bail:
   vfree(ffdc);
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,24 +1,24 @@
 ssize_t generic_file_splice_read(struct file *in, loff_t *ppos, struct pipe_inode_info *pipe, size_t len, unsigned int flags) {
   struct iov_iter to;
   struct kiocb kiocb;
   int idx, ret;
-  iov_iter_pipe(&to, ITER_PIPE | READ, pipe, len);
+  iov_iter_pipe(&to, READ, pipe, len);
   idx = to.idx;
   init_sync_kiocb(&kiocb, in);
   kiocb.ki_pos = *ppos;
   ret = call_read_iter(in, &kiocb, &to);
   if (ret > 0) {
     *ppos = kiocb.ki_pos;
     file_accessed(in);
   } else if (ret < 0) {
     to.idx = idx;
     to.iov_offset = 0;
     iov_iter_advance(&to, 0); /* to free what was emitted */
     /*
      * callers of ->splice_read() expect -EAGAIN on
      * "can't put anything in there", rather than -EFAULT.
      */
     if (ret == -EFAULT) ret = -EAGAIN;
   }
   return ret;
 }<sep>@@
expression e1,e2,e3,e;
@@
               iov_iter_pipe(e1,
-                              ITER_PIPE | e
+                              e
                            , e2,e3)
--- initial
+++ final
@@ -1,19 +1,19 @@
 static void smp_send_cmd(struct l2cap_conn *conn, u8 code, u16 len, void *data) {
   struct l2cap_chan *chan = conn->smp;
   struct smp_chan *smp;
   struct kvec iv[2];
   struct msghdr msg;
   if (!chan) return;
   BT_DBG("code 0x%2.2x", code);
   iv[0].iov_base = &code;
   iv[0].iov_len = 1;
   iv[1].iov_base = data;
   iv[1].iov_len = len;
   memset(&msg, 0, sizeof(msg));
-  iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, iv, 2, 1 + len);
+  iov_iter_kvec(&msg.msg_iter, WRITE, iv, 2, 1 + len);
   l2cap_chan_send(chan, &msg, 1 + len);
   if (!chan->data) return;
   smp = chan->data;
   cancel_delayed_work_sync(&smp->security_timer);
   schedule_delayed_work(&smp->security_timer, SMP_TIMEOUT);
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,39 +1,39 @@
 __be32 nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, loff_t offset, struct kvec *vec, int vlen, unsigned long *cnt, int stable) {
   struct svc_export *exp;
   struct iov_iter iter;
   __be32 nfserr;
   int host_err;
   int use_wgather;
   loff_t pos = offset;
   unsigned int pflags = current->flags;
   rwf_t flags = 0;
   trace_nfsd_write_opened(rqstp, fhp, offset, *cnt);
   if (test_bit(RQ_LOCAL, &rqstp->rq_flags))
     /*
      * We want less throttling in balance_dirty_pages()
      * and shrink_inactive_list() so that nfs to
      * localhost doesn't cause nfsd to lock up due to all
      * the client's dirty pages or its congested queue.
      */
     current->flags |= PF_LESS_THROTTLE;
   exp = fhp->fh_export;
   use_wgather = (rqstp->rq_vers == 2) && EX_WGATHER(exp);
   if (!EX_ISSYNC(exp)) stable = NFS_UNSTABLE;
   if (stable && !use_wgather) flags |= RWF_SYNC;
-  iov_iter_kvec(&iter, WRITE | ITER_KVEC, vec, vlen, *cnt);
+  iov_iter_kvec(&iter, WRITE, vec, vlen, *cnt);
   host_err = vfs_iter_write(file, &iter, &pos, flags);
   if (host_err < 0) goto out_nfserr;
   nfsdstats.io_write += *cnt;
   fsnotify_modify(file);
   if (stable && use_wgather) host_err = wait_for_concurrent_writes(file);
 out_nfserr:
   if (host_err >= 0) {
     trace_nfsd_write_io_done(rqstp, fhp, offset, *cnt);
     nfserr = nfs_ok;
   } else {
     trace_nfsd_write_err(rqstp, fhp, offset, host_err);
     nfserr = nfserrno(host_err);
   }
   if (test_bit(RQ_LOCAL, &rqstp->rq_flags)) current_restore_flags(pflags, PF_LESS_THROTTLE);
   return nfserr;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,38 +1,38 @@
 int drbd_send(struct drbd_connection *connection, struct socket *sock, void *buf, size_t size, unsigned msg_flags) {
   struct kvec iov = {.iov_base = buf, .iov_len = size};
   struct msghdr msg = {.msg_flags = msg_flags | MSG_NOSIGNAL};
   int rv, sent = 0;
   if (!sock) return -EBADR;
   /* THINK  if (signal_pending) return ... ? */
-  iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iov, 1, size);
+  iov_iter_kvec(&msg.msg_iter, WRITE, &iov, 1, size);
   if (sock == connection->data.socket) {
     rcu_read_lock();
     connection->ko_count = rcu_dereference(connection->net_conf)->ko_count;
     rcu_read_unlock();
     drbd_update_congested(connection);
   }
   do {
     rv = sock_sendmsg(sock, &msg);
     if (rv == -EAGAIN) {
       if (we_should_drop_the_connection(connection, sock))
         break;
       else
         continue;
     }
     if (rv == -EINTR) {
       flush_signals(current);
       rv = 0;
     }
     if (rv < 0) break;
     sent += rv;
   } while (sent < size);
   if (sock == connection->data.socket) clear_bit(NET_CONGESTED, &connection->flags);
   if (rv <= 0) {
     if (rv != -EAGAIN) {
       drbd_err(connection, "%s_sendmsg returned %d\n", sock == connection->meta.socket ? "msock" : "sock", rv);
       conn_request_state(connection, NS(conn, C_BROKEN_PIPE), CS_HARD);
     } else
       conn_request_state(connection, NS(conn, C_TIMEOUT), CS_HARD);
   }
   return sent;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,14 +1,14 @@
 ssize_t vmci_qpair_peek(struct vmci_qp *qpair, void *buf, size_t buf_size, int buf_type) {
   struct iov_iter to;
   struct kvec v = {.iov_base = buf, .iov_len = buf_size};
   ssize_t result;
   if (!qpair || !buf) return VMCI_ERROR_INVALID_ARGS;
-  iov_iter_kvec(&to, READ | ITER_KVEC, &v, 1, buf_size);
+  iov_iter_kvec(&to, READ, &v, 1, buf_size);
   qp_lock(qpair);
   do {
     result = qp_dequeue_locked(qpair->produce_q, qpair->consume_q, qpair->consume_q_size, &to, false);
     if (result == VMCI_ERROR_QUEUEPAIR_NOT_READY && !qp_wait_for_ready_queue(qpair)) result = VMCI_ERROR_WOULD_BLOCK;
   } while (result == VMCI_ERROR_QUEUEPAIR_NOT_READY);
   qp_unlock(qpair);
   return result;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,22 +1,22 @@
 static ssize_t nvmet_file_submit_bvec(struct nvmet_req *req, loff_t pos, unsigned long nr_segs, size_t count) {
   struct kiocb *iocb = &req->f.iocb;
   ssize_t (*call_iter)(struct kiocb * iocb, struct iov_iter * iter);
   struct iov_iter iter;
   int ki_flags = 0, rw;
   ssize_t ret;
   if (req->cmd->rw.opcode == nvme_cmd_write) {
     if (req->cmd->rw.control & cpu_to_le16(NVME_RW_FUA)) ki_flags = IOCB_DSYNC;
     call_iter = req->ns->file->f_op->write_iter;
     rw = WRITE;
   } else {
     call_iter = req->ns->file->f_op->read_iter;
     rw = READ;
   }
-  iov_iter_bvec(&iter, ITER_BVEC | rw, req->f.bvec, nr_segs, count);
+  iov_iter_bvec(&iter, rw, req->f.bvec, nr_segs, count);
   iocb->ki_pos = pos;
   iocb->ki_filp = req->ns->file;
   iocb->ki_flags = ki_flags | iocb_flags(req->ns->file);
   ret = call_iter(iocb, &iter);
   if (ret != -EIOCBQUEUED && iocb->ki_complete) iocb->ki_complete(iocb, ret, 0);
   return ret;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_bvec(e1,
-                              ITER_BVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,67 +1,67 @@
 int setup_aio_ctx_iter(struct cifs_aio_ctx *ctx, struct iov_iter *iter, int rw) {
   ssize_t rc;
   unsigned int cur_npages;
   unsigned int npages = 0;
   unsigned int i;
   size_t len;
   size_t count = iov_iter_count(iter);
   unsigned int saved_len;
   size_t start;
   unsigned int max_pages = iov_iter_npages(iter, INT_MAX);
   struct page **pages = NULL;
   struct bio_vec *bv = NULL;
   if (iov_iter_is_kvec(iter)) {
     memcpy(&ctx->iter, iter, sizeof(struct iov_iter));
     ctx->len = count;
     iov_iter_advance(iter, count);
     return 0;
   }
   if (max_pages * sizeof(struct bio_vec) <= CIFS_AIO_KMALLOC_LIMIT) bv = kmalloc_array(max_pages, sizeof(struct bio_vec), GFP_KERNEL);
   if (!bv) {
     bv = vmalloc(array_size(max_pages, sizeof(struct bio_vec)));
     if (!bv) return -ENOMEM;
   }
   if (max_pages * sizeof(struct page *) <= CIFS_AIO_KMALLOC_LIMIT) pages = kmalloc_array(max_pages, sizeof(struct page *), GFP_KERNEL);
   if (!pages) {
     pages = vmalloc(array_size(max_pages, sizeof(struct page *)));
     if (!pages) {
       kvfree(bv);
       return -ENOMEM;
     }
   }
   saved_len = count;
   while (count && npages < max_pages) {
     rc = iov_iter_get_pages(iter, pages, count, max_pages, &start);
     if (rc < 0) {
       cifs_dbg(VFS, "couldn't get user pages (rc=%zd)\n", rc);
       break;
     }
     if (rc > count) {
       cifs_dbg(VFS, "get pages rc=%zd more than %zu\n", rc, count);
       break;
     }
     iov_iter_advance(iter, rc);
     count -= rc;
     rc += start;
     cur_npages = DIV_ROUND_UP(rc, PAGE_SIZE);
     if (npages + cur_npages > max_pages) {
       cifs_dbg(VFS, "out of vec array capacity (%u vs %u)\n", npages + cur_npages, max_pages);
       break;
     }
     for (i = 0; i < cur_npages; i++) {
       len = rc > PAGE_SIZE ? PAGE_SIZE : rc;
       bv[npages + i].bv_page = pages[i];
       bv[npages + i].bv_offset = start;
       bv[npages + i].bv_len = len - start;
       rc -= len;
       start = 0;
     }
     npages += cur_npages;
   }
   kvfree(pages);
   ctx->bv = bv;
   ctx->len = saved_len - count;
   ctx->npages = npages;
-  iov_iter_bvec(&ctx->iter, ITER_BVEC | rw, ctx->bv, npages, ctx->len);
+  iov_iter_bvec(&ctx->iter, rw, ctx->bv, npages, ctx->len);
   return 0;
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_bvec(e1,
-                              ITER_BVEC | e
+                              e
                            , e2,e3,e4)
--- initial
+++ final
@@ -1,44 +1,44 @@
 static int v9fs_dir_readdir(struct file *file, struct dir_context *ctx) {
   bool over;
   struct p9_wstat st;
   int err = 0;
   struct p9_fid *fid;
   int buflen;
   int reclen = 0;
   struct p9_rdir *rdir;
   struct kvec kvec;
   p9_debug(P9_DEBUG_VFS, "name %pD\n", file);
   fid = file->private_data;
   buflen = fid->clnt->msize - P9_IOHDRSZ;
   rdir = v9fs_alloc_rdir_buf(file, buflen);
   if (!rdir) return -ENOMEM;
   kvec.iov_base = rdir->buf;
   kvec.iov_len = buflen;
   while (1) {
     if (rdir->tail == rdir->head) {
       struct iov_iter to;
       int n;
-      iov_iter_kvec(&to, READ | ITER_KVEC, &kvec, 1, buflen);
+      iov_iter_kvec(&to, READ, &kvec, 1, buflen);
       n = p9_client_read(file->private_data, ctx->pos, &to, &err);
       if (err) return err;
       if (n == 0) return 0;
       rdir->head = 0;
       rdir->tail = n;
     }
     while (rdir->head < rdir->tail) {
       p9stat_init(&st);
       err = p9stat_read(fid->clnt, rdir->buf + rdir->head, rdir->tail - rdir->head, &st);
       if (err) {
         p9_debug(P9_DEBUG_VFS, "returned %d\n", err);
         p9stat_free(&st);
         return -EIO;
       }
       reclen = st.size + 2;
       over = !dir_emit(ctx, st.name, strlen(st.name), v9fs_qid2ino(&st.qid), dt_type(&st));
       p9stat_free(&st);
       if (over) return 0;
       rdir->head += reclen;
       ctx->pos += reclen;
     }
   }
 }<sep>@@
expression e1,e2,e3,e4,e;
@@
               iov_iter_kvec(e1,
-                              ITER_KVEC | e
+                              e
                            , e2,e3,e4)