imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,54 +1,54 @@
 static int ib_mad_post_receive_mads(struct ib_mad_qp_info *qp_info, struct ib_mad_private *mad) {
   unsigned long flags;
   int post, ret;
   struct ib_mad_private *mad_priv;
   struct ib_sge sg_list;
-  struct ib_recv_wr recv_wr, *bad_recv_wr;
+  struct ib_recv_wr recv_wr;
   struct ib_mad_queue *recv_queue = &qp_info->recv_queue;
   /* Initialize common scatter list fields */
   sg_list.lkey = qp_info->port_priv->pd->local_dma_lkey;
   /* Initialize common receive WR fields */
   recv_wr.next = NULL;
   recv_wr.sg_list = &sg_list;
   recv_wr.num_sge = 1;
   do {
     /* Allocate and map receive buffer */
     if (mad) {
       mad_priv = mad;
       mad = NULL;
     } else {
       mad_priv = alloc_mad_private(port_mad_size(qp_info->port_priv), GFP_ATOMIC);
       if (!mad_priv) {
         ret = -ENOMEM;
         break;
       }
     }
     sg_list.length = mad_priv_dma_size(mad_priv);
     sg_list.addr = ib_dma_map_single(qp_info->port_priv->device, &mad_priv->grh, mad_priv_dma_size(mad_priv), DMA_FROM_DEVICE);
     if (unlikely(ib_dma_mapping_error(qp_info->port_priv->device, sg_list.addr))) {
       ret = -ENOMEM;
       break;
     }
     mad_priv->header.mapping = sg_list.addr;
     mad_priv->header.mad_list.mad_queue = recv_queue;
     mad_priv->header.mad_list.cqe.done = ib_mad_recv_done;
     recv_wr.wr_cqe = &mad_priv->header.mad_list.cqe;
     /* Post receive WR */
     spin_lock_irqsave(&recv_queue->lock, flags);
     post = (++recv_queue->count < recv_queue->max_active);
     list_add_tail(&mad_priv->header.mad_list.list, &recv_queue->list);
     spin_unlock_irqrestore(&recv_queue->lock, flags);
-    ret = ib_post_recv(qp_info->qp, &recv_wr, &bad_recv_wr);
+    ret = ib_post_recv(qp_info->qp, &recv_wr, NULL);
     if (ret) {
       spin_lock_irqsave(&recv_queue->lock, flags);
       list_del(&mad_priv->header.mad_list.list);
       recv_queue->count--;
       spin_unlock_irqrestore(&recv_queue->lock, flags);
       ib_dma_unmap_single(qp_info->port_priv->device, mad_priv->header.mapping, mad_priv_dma_size(mad_priv), DMA_FROM_DEVICE);
       kfree(mad_priv);
       dev_err(&qp_info->port_priv->device->dev, "ib_post_recv failed: %d\n", ret);
       break;
     }
   } while (post);
   return ret;
 }<sep>@@
identifier bad_recv_wr;
expression e1,e2,e;
@@

-struct ib_recv_wr *bad_recv_wr;
<+... when != bad_recv_wr
(
-   bad_send_wr = &e;
|
    ib_post_srq_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
|
    ib_post_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,45 +1,44 @@
 static void ib_mad_send_done(struct ib_cq *cq, struct ib_wc *wc) {
   struct ib_mad_port_private *port_priv = cq->cq_context;
   struct ib_mad_list_head *mad_list = container_of(wc->wr_cqe, struct ib_mad_list_head, cqe);
   struct ib_mad_send_wr_private *mad_send_wr, *queued_send_wr;
   struct ib_mad_qp_info *qp_info;
   struct ib_mad_queue *send_queue;
-  struct ib_send_wr *bad_send_wr;
   struct ib_mad_send_wc mad_send_wc;
   unsigned long flags;
   int ret;
   if (list_empty_careful(&port_priv->port_list)) return;
   if (wc->status != IB_WC_SUCCESS) {
     if (!ib_mad_send_error(port_priv, wc)) return;
   }
   mad_send_wr = container_of(mad_list, struct ib_mad_send_wr_private, mad_list);
   send_queue = mad_list->mad_queue;
   qp_info = send_queue->qp_info;
 retry:
   ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device, mad_send_wr->header_mapping, mad_send_wr->sg_list[0].length, DMA_TO_DEVICE);
   ib_dma_unmap_single(mad_send_wr->send_buf.mad_agent->device, mad_send_wr->payload_mapping, mad_send_wr->sg_list[1].length, DMA_TO_DEVICE);
   queued_send_wr = NULL;
   spin_lock_irqsave(&send_queue->lock, flags);
   list_del(&mad_list->list);
   /* Move queued send to the send queue */
   if (send_queue->count-- > send_queue->max_active) {
     mad_list = container_of(qp_info->overflow_list.next, struct ib_mad_list_head, list);
     queued_send_wr = container_of(mad_list, struct ib_mad_send_wr_private, mad_list);
     list_move_tail(&mad_list->list, &send_queue->list);
   }
   spin_unlock_irqrestore(&send_queue->lock, flags);
   mad_send_wc.send_buf = &mad_send_wr->send_buf;
   mad_send_wc.status = wc->status;
   mad_send_wc.vendor_err = wc->vendor_err;
   if (atomic_read(&qp_info->snoop_count)) snoop_send(qp_info, &mad_send_wr->send_buf, &mad_send_wc, IB_MAD_SNOOP_SEND_COMPLETIONS);
   ib_mad_complete_send_wr(mad_send_wr, &mad_send_wc);
   if (queued_send_wr) {
-    ret = ib_post_send(qp_info->qp, &queued_send_wr->send_wr.wr, &bad_send_wr);
+    ret = ib_post_send(qp_info->qp, &queued_send_wr->send_wr.wr, NULL);
     if (ret) {
       dev_err(&port_priv->device->dev, "ib_post_send failed: %d\n", ret);
       mad_send_wr = queued_send_wr;
       wc->status = IB_WC_LOC_QP_OP_ERR;
       goto retry;
     }
   }
 }<sep>@@
identifier bad_send_wr;
expression e1,e2,e;
@@

-struct ib_send_wr *bad_send_wr;
<+... when != bad_send_wr
(
-   bad_send_wr = &e;
|
    ib_post_send(e1,e2,
-		   &bad_send_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,35 +1,33 @@
 static bool ib_mad_send_error(struct ib_mad_port_private *port_priv, struct ib_wc *wc) {
   struct ib_mad_list_head *mad_list = container_of(wc->wr_cqe, struct ib_mad_list_head, cqe);
   struct ib_mad_qp_info *qp_info = mad_list->mad_queue->qp_info;
   struct ib_mad_send_wr_private *mad_send_wr;
   int ret;
   /*
    * Send errors will transition the QP to SQE - move
    * QP to RTS and repost flushed work requests
    */
   mad_send_wr = container_of(mad_list, struct ib_mad_send_wr_private, mad_list);
   if (wc->status == IB_WC_WR_FLUSH_ERR) {
     if (mad_send_wr->retry) {
-      /* Repost send */
-      struct ib_send_wr *bad_send_wr;
       mad_send_wr->retry = 0;
-      ret = ib_post_send(qp_info->qp, &mad_send_wr->send_wr.wr, &bad_send_wr);
+      ret = ib_post_send(qp_info->qp, &mad_send_wr->send_wr.wr, NULL);
       if (!ret) return false;
     }
   } else {
     struct ib_qp_attr *attr;
     /* Transition QP to RTS and fail offending send */
     attr = kmalloc(sizeof *attr, GFP_KERNEL);
     if (attr) {
       attr->qp_state = IB_QPS_RTS;
       attr->cur_qp_state = IB_QPS_SQE;
       ret = ib_modify_qp(qp_info->qp, attr, IB_QP_STATE | IB_QP_CUR_STATE);
       kfree(attr);
       if (ret)
         dev_err(&port_priv->device->dev, "%s - ib_modify_qp to RTS: %d\n", __func__, ret);
       else
         mark_sends_for_retry(qp_info);
     }
   }
   return true;
 }<sep>@@
identifier bad_send_wr;
expression e1,e2,e;
@@

-struct ib_send_wr *bad_send_wr;
<+... when != bad_send_wr
(
-   bad_send_wr = &e;
|
    ib_post_send(e1,e2,
-		   &bad_send_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,43 +1,42 @@
 int ib_send_mad(struct ib_mad_send_wr_private *mad_send_wr) {
   struct ib_mad_qp_info *qp_info;
   struct list_head *list;
-  struct ib_send_wr *bad_send_wr;
   struct ib_mad_agent *mad_agent;
   struct ib_sge *sge;
   unsigned long flags;
   int ret;
   /* Set WR ID to find mad_send_wr upon completion */
   qp_info = mad_send_wr->mad_agent_priv->qp_info;
   mad_send_wr->mad_list.mad_queue = &qp_info->send_queue;
   mad_send_wr->mad_list.cqe.done = ib_mad_send_done;
   mad_send_wr->send_wr.wr.wr_cqe = &mad_send_wr->mad_list.cqe;
   mad_agent = mad_send_wr->send_buf.mad_agent;
   sge = mad_send_wr->sg_list;
   sge[0].addr = ib_dma_map_single(mad_agent->device, mad_send_wr->send_buf.mad, sge[0].length, DMA_TO_DEVICE);
   if (unlikely(ib_dma_mapping_error(mad_agent->device, sge[0].addr))) return -ENOMEM;
   mad_send_wr->header_mapping = sge[0].addr;
   sge[1].addr = ib_dma_map_single(mad_agent->device, ib_get_payload(mad_send_wr), sge[1].length, DMA_TO_DEVICE);
   if (unlikely(ib_dma_mapping_error(mad_agent->device, sge[1].addr))) {
     ib_dma_unmap_single(mad_agent->device, mad_send_wr->header_mapping, sge[0].length, DMA_TO_DEVICE);
     return -ENOMEM;
   }
   mad_send_wr->payload_mapping = sge[1].addr;
   spin_lock_irqsave(&qp_info->send_queue.lock, flags);
   if (qp_info->send_queue.count < qp_info->send_queue.max_active) {
-    ret = ib_post_send(mad_agent->qp, &mad_send_wr->send_wr.wr, &bad_send_wr);
+    ret = ib_post_send(mad_agent->qp, &mad_send_wr->send_wr.wr, NULL);
     list = &qp_info->send_queue.list;
   } else {
     ret = 0;
     list = &qp_info->overflow_list;
   }
   if (!ret) {
     qp_info->send_queue.count++;
     list_add_tail(&mad_send_wr->mad_list.list, list);
   }
   spin_unlock_irqrestore(&qp_info->send_queue.lock, flags);
   if (ret) {
     ib_dma_unmap_single(mad_agent->device, mad_send_wr->header_mapping, sge[0].length, DMA_TO_DEVICE);
     ib_dma_unmap_single(mad_agent->device, mad_send_wr->payload_mapping, sge[1].length, DMA_TO_DEVICE);
   }
   return ret;
 }<sep>@@
identifier bad_send_wr;
expression e1,e2,e;
@@

-struct ib_send_wr *bad_send_wr;
<+... when != bad_send_wr
(
-   bad_send_wr = &e;
|
    ib_post_send(e1,e2,
-		   &bad_send_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,5 +1,5 @@
 int rdma_rw_ctx_post(struct rdma_rw_ctx *ctx, struct ib_qp *qp, u8 port_num, struct ib_cqe *cqe, struct ib_send_wr *chain_wr) {
-  struct ib_send_wr *first_wr, *bad_wr;
+  struct ib_send_wr *first_wr;
   first_wr = rdma_rw_ctx_wrs(ctx, qp, port_num, cqe, chain_wr);
-  return ib_post_send(qp, first_wr, &bad_wr);
+  return ib_post_send(qp, first_wr, NULL);
 }<sep>@@
identifier bad_send_wr;
expression e1,e2,e;
@@

-struct ib_send_wr *bad_send_wr;
<+... when != bad_send_wr
(
-   bad_send_wr = &e;
|
    ib_post_send(e1,e2,
-		   &bad_send_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,25 +1,25 @@
 static void __ib_drain_rq(struct ib_qp *qp) {
   struct ib_cq *cq = qp->recv_cq;
   struct ib_qp_attr attr = {.qp_state = IB_QPS_ERR};
   struct ib_drain_cqe rdrain;
-  struct ib_recv_wr rwr = {}, *bad_rwr;
+  struct ib_recv_wr rwr = {};
   int ret;
   ret = ib_modify_qp(qp, &attr, IB_QP_STATE);
   if (ret) {
     WARN_ONCE(ret, "failed to drain recv queue: %d\n", ret);
     return;
   }
   rwr.wr_cqe = &rdrain.cqe;
   rdrain.cqe.done = ib_drain_qp_done;
   init_completion(&rdrain.done);
-  ret = ib_post_recv(qp, &rwr, &bad_rwr);
+  ret = ib_post_recv(qp, &rwr, NULL);
   if (ret) {
     WARN_ONCE(ret, "failed to drain recv queue: %d\n", ret);
     return;
   }
   if (cq->poll_ctx == IB_POLL_DIRECT)
     while (wait_for_completion_timeout(&rdrain.done, HZ / 10) <= 0)
       ib_process_cq_direct(cq, -1);
   else
     wait_for_completion(&rdrain.done);
 }<sep>@@
identifier bad_recv_wr;
expression e1,e2,e;
@@

-struct ib_recv_wr *bad_recv_wr;
<+... when != bad_recv_wr
(
-   bad_send_wr = &e;
|
    ib_post_srq_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
|
    ib_post_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,34 +1,33 @@
 static void __ib_drain_sq(struct ib_qp *qp) {
   struct ib_cq *cq = qp->send_cq;
   struct ib_qp_attr attr = {.qp_state = IB_QPS_ERR};
   struct ib_drain_cqe sdrain;
-  struct ib_send_wr *bad_swr;
   struct ib_rdma_wr swr = {
       .wr =
           {
               .next = NULL,
               {
                   .wr_cqe = &sdrain.cqe,
               },
               .opcode = IB_WR_RDMA_WRITE,
           },
   };
   int ret;
   ret = ib_modify_qp(qp, &attr, IB_QP_STATE);
   if (ret) {
     WARN_ONCE(ret, "failed to drain send queue: %d\n", ret);
     return;
   }
   sdrain.cqe.done = ib_drain_qp_done;
   init_completion(&sdrain.done);
-  ret = ib_post_send(qp, &swr.wr, &bad_swr);
+  ret = ib_post_send(qp, &swr.wr, NULL);
   if (ret) {
     WARN_ONCE(ret, "failed to drain send queue: %d\n", ret);
     return;
   }
   if (cq->poll_ctx == IB_POLL_DIRECT)
     while (wait_for_completion_timeout(&sdrain.done, HZ / 10) <= 0)
       ib_process_cq_direct(cq, -1);
   else
     wait_for_completion(&sdrain.done);
 }<sep>@@
identifier bad_send_wr;
expression e1,e2,e;
@@

-struct ib_send_wr *bad_send_wr;
<+... when != bad_send_wr
(
-   bad_send_wr = &e;
|
    ib_post_send(e1,e2,
-		   &bad_send_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,16 +1,15 @@
 static int ipoib_cm_post_receive_nonsrq(struct net_device *dev, struct ipoib_cm_rx *rx, struct ib_recv_wr *wr, struct ib_sge *sge, int id) {
   struct ipoib_dev_priv *priv = ipoib_priv(dev);
-  struct ib_recv_wr *bad_wr;
   int i, ret;
   wr->wr_id = id | IPOIB_OP_CM | IPOIB_OP_RECV;
   for (i = 0; i < IPOIB_CM_RX_SG; ++i)
     sge[i].addr = rx->rx_ring[id].mapping[i];
-  ret = ib_post_recv(rx->qp, wr, &bad_wr);
+  ret = ib_post_recv(rx->qp, wr, NULL);
   if (unlikely(ret)) {
     ipoib_warn(priv, "post recv failed for buf %d (%d)\n", id, ret);
     ipoib_cm_dma_unmap_rx(priv, IPOIB_CM_RX_SG - 1, rx->rx_ring[id].mapping);
     dev_kfree_skb_any(rx->rx_ring[id].skb);
     rx->rx_ring[id].skb = NULL;
   }
   return ret;
 }<sep>@@
identifier bad_recv_wr;
expression e1,e2,e;
@@

-struct ib_recv_wr *bad_recv_wr;
<+... when != bad_recv_wr
(
-   bad_send_wr = &e;
|
    ib_post_srq_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
|
    ib_post_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,16 +1,15 @@
 static int ipoib_cm_post_receive_srq(struct net_device *dev, int id) {
   struct ipoib_dev_priv *priv = ipoib_priv(dev);
-  struct ib_recv_wr *bad_wr;
   int i, ret;
   priv->cm.rx_wr.wr_id = id | IPOIB_OP_CM | IPOIB_OP_RECV;
   for (i = 0; i < priv->cm.num_frags; ++i)
     priv->cm.rx_sge[i].addr = priv->cm.srq_ring[id].mapping[i];
-  ret = ib_post_srq_recv(priv->cm.srq, &priv->cm.rx_wr, &bad_wr);
+  ret = ib_post_srq_recv(priv->cm.srq, &priv->cm.rx_wr, NULL);
   if (unlikely(ret)) {
     ipoib_warn(priv, "post srq failed for buf %d (%d)\n", id, ret);
     ipoib_cm_dma_unmap_rx(priv, priv->cm.num_frags - 1, priv->cm.srq_ring[id].mapping);
     dev_kfree_skb_any(priv->cm.srq_ring[id].skb);
     priv->cm.srq_ring[id].skb = NULL;
   }
   return ret;
 }<sep>@@
identifier bad_recv_wr;
expression e1,e2,e;
@@

-struct ib_recv_wr *bad_recv_wr;
<+... when != bad_recv_wr
(
-   bad_send_wr = &e;
|
    ib_post_srq_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
|
    ib_post_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,15 +1,14 @@
 static void ipoib_cm_start_rx_drain(struct ipoib_dev_priv *priv) {
-  struct ib_send_wr *bad_wr;
   struct ipoib_cm_rx *p;
   /* We only reserved 1 extra slot in CQ for drain WRs, so
    * make sure we have at most 1 outstanding WR. */
   if (list_empty(&priv->cm.rx_flush_list) || !list_empty(&priv->cm.rx_drain_list)) return;
   /*
    * QPs on flush list are error state.  This way, a "flush
    * error" WC will be immediately generated for each WR we post.
    */
   p = list_entry(priv->cm.rx_flush_list.next, typeof(*p), list);
   ipoib_cm_rx_drain_wr.wr_id = IPOIB_CM_RX_DRAIN_WRID;
-  if (ib_post_send(p->qp, &ipoib_cm_rx_drain_wr, &bad_wr)) ipoib_warn(priv, "failed to post drain wr\n");
+  if (ib_post_send(p->qp, &ipoib_cm_rx_drain_wr, NULL)) ipoib_warn(priv, "failed to post drain wr\n");
   list_splice_init(&priv->cm.rx_flush_list, &priv->cm.rx_drain_list);
 }<sep>@@
identifier bad_send_wr;
expression e1,e2,e;
@@

-struct ib_send_wr *bad_send_wr;
<+... when != bad_send_wr
(
-   bad_send_wr = &e;
|
    ib_post_send(e1,e2,
-		   &bad_send_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,6 +1,5 @@
 static inline int post_send(struct ipoib_dev_priv *priv, struct ipoib_cm_tx *tx, unsigned int wr_id, struct ipoib_tx_buf *tx_req) {
-  struct ib_send_wr *bad_wr;
   ipoib_build_sge(priv, tx_req);
   priv->tx_wr.wr.wr_id = wr_id | IPOIB_OP_CM;
-  return ib_post_send(tx->qp, &priv->tx_wr.wr, &bad_wr);
+  return ib_post_send(tx->qp, &priv->tx_wr.wr, NULL);
 }<sep>@@
identifier bad_send_wr;
expression e1,e2,e;
@@

-struct ib_send_wr *bad_send_wr;
<+... when != bad_send_wr
(
-   bad_send_wr = &e;
|
    ib_post_send(e1,e2,
-		   &bad_send_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,16 +1,15 @@
 static int ipoib_ib_post_receive(struct net_device *dev, int id) {
   struct ipoib_dev_priv *priv = ipoib_priv(dev);
-  struct ib_recv_wr *bad_wr;
   int ret;
   priv->rx_wr.wr_id = id | IPOIB_OP_RECV;
   priv->rx_sge[0].addr = priv->rx_ring[id].mapping[0];
   priv->rx_sge[1].addr = priv->rx_ring[id].mapping[1];
-  ret = ib_post_recv(priv->qp, &priv->rx_wr, &bad_wr);
+  ret = ib_post_recv(priv->qp, &priv->rx_wr, NULL);
   if (unlikely(ret)) {
     ipoib_warn(priv, "receive failed for buf %d (%d)\n", id, ret);
     ipoib_ud_dma_unmap_rx(priv, priv->rx_ring[id].mapping);
     dev_kfree_skb_any(priv->rx_ring[id].skb);
     priv->rx_ring[id].skb = NULL;
   }
   return ret;
 }<sep>@@
identifier bad_recv_wr;
expression e1,e2,e;
@@

-struct ib_recv_wr *bad_recv_wr;
<+... when != bad_recv_wr
(
-   bad_send_wr = &e;
|
    ib_post_srq_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
|
    ib_post_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,16 +1,15 @@
 static inline int post_send(struct ipoib_dev_priv *priv, unsigned int wr_id, struct ib_ah *address, u32 dqpn, struct ipoib_tx_buf *tx_req, void *head, int hlen) {
-  struct ib_send_wr *bad_wr;
   struct sk_buff *skb = tx_req->skb;
   ipoib_build_sge(priv, tx_req);
   priv->tx_wr.wr.wr_id = wr_id;
   priv->tx_wr.remote_qpn = dqpn;
   priv->tx_wr.ah = address;
   if (head) {
     priv->tx_wr.mss = skb_shinfo(skb)->gso_size;
     priv->tx_wr.header = head;
     priv->tx_wr.hlen = hlen;
     priv->tx_wr.wr.opcode = IB_WR_LSO;
   } else
     priv->tx_wr.wr.opcode = IB_WR_SEND;
-  return ib_post_send(priv->qp, &priv->tx_wr.wr, &bad_wr);
+  return ib_post_send(priv->qp, &priv->tx_wr.wr, NULL);
 }<sep>@@
identifier bad_send_wr;
expression e1,e2,e;
@@

-struct ib_send_wr *bad_send_wr;
<+... when != bad_send_wr
(
-   bad_send_wr = &e;
|
    ib_post_send(e1,e2,
-		   &bad_send_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,21 +1,21 @@
 int iser_post_recvl(struct iser_conn *iser_conn) {
   struct ib_conn *ib_conn = &iser_conn->ib_conn;
   struct iser_login_desc *desc = &iser_conn->login_desc;
-  struct ib_recv_wr wr, *wr_failed;
+  struct ib_recv_wr wr;
   int ib_ret;
   desc->sge.addr = desc->rsp_dma;
   desc->sge.length = ISER_RX_LOGIN_SIZE;
   desc->sge.lkey = ib_conn->device->pd->local_dma_lkey;
   desc->cqe.done = iser_login_rsp;
   wr.wr_cqe = &desc->cqe;
   wr.sg_list = &desc->sge;
   wr.num_sge = 1;
   wr.next = NULL;
   ib_conn->post_recv_buf_count++;
-  ib_ret = ib_post_recv(ib_conn->qp, &wr, &wr_failed);
+  ib_ret = ib_post_recv(ib_conn->qp, &wr, NULL);
   if (ib_ret) {
     iser_err("ib_post_recv failed ret=%d\n", ib_ret);
     ib_conn->post_recv_buf_count--;
   }
   return ib_ret;
 }<sep>@@
identifier bad_recv_wr;
expression e1,e2,e;
@@

-struct ib_recv_wr *bad_recv_wr;
<+... when != bad_recv_wr
(
-   bad_send_wr = &e;
|
    ib_post_srq_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
|
    ib_post_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,26 +1,26 @@
 int iser_post_recvm(struct iser_conn *iser_conn, int count) {
   struct ib_conn *ib_conn = &iser_conn->ib_conn;
   unsigned int my_rx_head = iser_conn->rx_desc_head;
   struct iser_rx_desc *rx_desc;
-  struct ib_recv_wr *wr, *wr_failed;
+  struct ib_recv_wr *wr;
   int i, ib_ret;
   for (wr = ib_conn->rx_wr, i = 0; i < count; i++, wr++) {
     rx_desc = &iser_conn->rx_descs[my_rx_head];
     rx_desc->cqe.done = iser_task_rsp;
     wr->wr_cqe = &rx_desc->cqe;
     wr->sg_list = &rx_desc->rx_sg;
     wr->num_sge = 1;
     wr->next = wr + 1;
     my_rx_head = (my_rx_head + 1) & iser_conn->qp_max_recv_dtos_mask;
   }
   wr--;
   wr->next = NULL; /* mark end of work requests list */
   ib_conn->post_recv_buf_count += count;
-  ib_ret = ib_post_recv(ib_conn->qp, ib_conn->rx_wr, &wr_failed);
+  ib_ret = ib_post_recv(ib_conn->qp, ib_conn->rx_wr, NULL);
   if (ib_ret) {
     iser_err("ib_post_recv failed ret=%d\n", ib_ret);
     ib_conn->post_recv_buf_count -= count;
   } else
     iser_conn->rx_desc_head = my_rx_head;
   return ib_ret;
 }<sep>@@
identifier bad_recv_wr;
expression e1,e2,e;
@@

-struct ib_recv_wr *bad_recv_wr;
<+... when != bad_recv_wr
(
-   bad_send_wr = &e;
|
    ib_post_srq_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
|
    ib_post_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,13 +1,12 @@
 static int nvme_rdma_inv_rkey(struct nvme_rdma_queue *queue, struct nvme_rdma_request *req) {
-  struct ib_send_wr *bad_wr;
   struct ib_send_wr wr = {
       .opcode = IB_WR_LOCAL_INV,
       .next = NULL,
       .num_sge = 0,
       .send_flags = IB_SEND_SIGNALED,
       .ex.invalidate_rkey = req->mr->rkey,
   };
   req->reg_cqe.done = nvme_rdma_inv_rkey_done;
   wr.wr_cqe = &req->reg_cqe;
-  return ib_post_send(queue->qp, &wr, &bad_wr);
+  return ib_post_send(queue->qp, &wr, NULL);
 }<sep>@@
identifier bad_send_wr;
expression e1,e2,e;
@@

-struct ib_send_wr *bad_send_wr;
<+... when != bad_send_wr
(
-   bad_send_wr = &e;
|
    ib_post_send(e1,e2,
-		   &bad_send_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,16 +1,16 @@
 static int nvme_rdma_post_recv(struct nvme_rdma_queue *queue, struct nvme_rdma_qe *qe) {
-  struct ib_recv_wr wr, *bad_wr;
+  struct ib_recv_wr wr;
   struct ib_sge list;
   int ret;
   list.addr = qe->dma;
   list.length = sizeof(struct nvme_completion);
   list.lkey = queue->device->pd->local_dma_lkey;
   qe->cqe.done = nvme_rdma_recv_done;
   wr.next = NULL;
   wr.wr_cqe = &qe->cqe;
   wr.sg_list = &list;
   wr.num_sge = 1;
-  ret = ib_post_recv(queue->qp, &wr, &bad_wr);
+  ret = ib_post_recv(queue->qp, &wr, NULL);
   if (unlikely(ret)) { dev_err(queue->ctrl->ctrl.device, "%s failed with error code %d\n", __func__, ret); }
   return ret;
 }<sep>@@
identifier bad_recv_wr;
expression e1,e2,e;
@@

-struct ib_recv_wr *bad_recv_wr;
<+... when != bad_recv_wr
(
-   bad_send_wr = &e;
|
    ib_post_srq_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
|
    ib_post_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,19 +1,19 @@
 static int nvme_rdma_post_send(struct nvme_rdma_queue *queue, struct nvme_rdma_qe *qe, struct ib_sge *sge, u32 num_sge, struct ib_send_wr *first) {
-  struct ib_send_wr wr, *bad_wr;
+  struct ib_send_wr wr;
   int ret;
   sge->addr = qe->dma;
   sge->length = sizeof(struct nvme_command), sge->lkey = queue->device->pd->local_dma_lkey;
   wr.next = NULL;
   wr.wr_cqe = &qe->cqe;
   wr.sg_list = sge;
   wr.num_sge = num_sge;
   wr.opcode = IB_WR_SEND;
   wr.send_flags = IB_SEND_SIGNALED;
   if (first)
     first->next = &wr;
   else
     first = &wr;
-  ret = ib_post_send(queue->qp, first, &bad_wr);
+  ret = ib_post_send(queue->qp, first, NULL);
   if (unlikely(ret)) { dev_err(queue->ctrl->ctrl.device, "%s failed with error code %d\n", __func__, ret); }
   return ret;
 }<sep>@@
identifier bad_send_wr;
expression e1,e2,e;
@@

-struct ib_send_wr *bad_send_wr;
<+... when != bad_send_wr
(
-   bad_send_wr = &e;
|
    ib_post_send(e1,e2,
-		   &bad_send_wr
+		   NULL
		)
)
...+>
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int nvmet_rdma_post_recv(struct nvmet_rdma_device *ndev, struct nvmet_rdma_cmd *cmd) {
-  struct ib_recv_wr *bad_wr;
   ib_dma_sync_single_for_device(ndev->device, cmd->sge[0].addr, cmd->sge[0].length, DMA_FROM_DEVICE);
-  if (ndev->srq) return ib_post_srq_recv(ndev->srq, &cmd->wr, &bad_wr);
-  return ib_post_recv(cmd->queue->cm_id->qp, &cmd->wr, &bad_wr);
+  if (ndev->srq) return ib_post_srq_recv(ndev->srq, &cmd->wr, NULL);
+  return ib_post_recv(cmd->queue->cm_id->qp, &cmd->wr, NULL);
 }<sep>@@
identifier bad_recv_wr;
expression e1,e2,e;
@@

-struct ib_recv_wr *bad_recv_wr;
<+... when != bad_recv_wr
(
-   bad_send_wr = &e;
|
    ib_post_srq_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
|
    ib_post_recv(e1,e2,
-		   &bad_recv_wr
+		   NULL
		)
)
...+>