imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,21 +1,21 @@
 static void nvmet_rdma_queue_response(struct nvmet_req *req) {
   struct nvmet_rdma_rsp *rsp = container_of(req, struct nvmet_rdma_rsp, req);
   struct rdma_cm_id *cm_id = rsp->queue->cm_id;
-  struct ib_send_wr *first_wr, *bad_wr;
+  struct ib_send_wr *first_wr;
   if (rsp->flags & NVMET_RDMA_REQ_INVALIDATE_RKEY) {
     rsp->send_wr.opcode = IB_WR_SEND_WITH_INV;
     rsp->send_wr.ex.invalidate_rkey = rsp->invalidate_rkey;
   } else {
     rsp->send_wr.opcode = IB_WR_SEND;
   }
   if (nvmet_rdma_need_data_out(rsp))
     first_wr = rdma_rw_ctx_wrs(&rsp->rw, cm_id->qp, cm_id->port_num, NULL, &rsp->send_wr);
   else
     first_wr = &rsp->send_wr;
   nvmet_rdma_post_recv(rsp->queue->dev, rsp->cmd);
   ib_dma_sync_single_for_device(rsp->queue->dev->device, rsp->send_sge.addr, rsp->send_sge.length, DMA_TO_DEVICE);
-  if (ib_post_send(cm_id->qp, first_wr, &bad_wr)) {
+  if (ib_post_send(cm_id->qp, first_wr, NULL)) {
     pr_err("sending cmd response failed\n");
     nvmet_rdma_release_rsp(rsp);
   }
 }<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,37 +1,37 @@
 int smbd_deregister_mr(struct smbd_mr *smbdirect_mr) {
-  struct ib_send_wr *wr, *bad_wr;
+  struct ib_send_wr *wr;
   struct smbd_connection *info = smbdirect_mr->conn;
   int rc = 0;
   if (smbdirect_mr->need_invalidate) {
     /* Need to finish local invalidation before returning */
     wr = &smbdirect_mr->inv_wr;
     wr->opcode = IB_WR_LOCAL_INV;
     smbdirect_mr->cqe.done = local_inv_done;
     wr->wr_cqe = &smbdirect_mr->cqe;
     wr->num_sge = 0;
     wr->ex.invalidate_rkey = smbdirect_mr->mr->rkey;
     wr->send_flags = IB_SEND_SIGNALED;
     init_completion(&smbdirect_mr->invalidate_done);
-    rc = ib_post_send(info->id->qp, wr, &bad_wr);
+    rc = ib_post_send(info->id->qp, wr, NULL);
     if (rc) {
       log_rdma_mr(ERR, "ib_post_send failed rc=%x\n", rc);
       smbd_disconnect_rdma_connection(info);
       goto done;
     }
     wait_for_completion(&smbdirect_mr->invalidate_done);
     smbdirect_mr->need_invalidate = false;
   } else
     /*
      * For remote invalidation, just set it to MR_INVALIDATED
      * and defer to mr_recovery_work to recover the MR for next use
      */
     smbdirect_mr->state = MR_INVALIDATED;
   /*
    * Schedule the work to do MR recovery for future I/Os
    * MR recovery is slow and we don't want it to block the current I/O
    */
   queue_work(info->workqueue, &info->mr_recovery_work);
 done:
   if (atomic_dec_and_test(&info->mr_used_count)) wake_up(&info->wait_for_mr_cleanup);
   return rc;
 }<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,20 +1,20 @@
 static int smbd_post_recv(struct smbd_connection *info, struct smbd_response *response) {
-  struct ib_recv_wr recv_wr, *recv_wr_fail = NULL;
+  struct ib_recv_wr recv_wr;
   int rc = -EIO;
   response->sge.addr = ib_dma_map_single(info->id->device, response->packet, info->max_receive_size, DMA_FROM_DEVICE);
   if (ib_dma_mapping_error(info->id->device, response->sge.addr)) return rc;
   response->sge.length = info->max_receive_size;
   response->sge.lkey = info->pd->local_dma_lkey;
   response->cqe.done = recv_done;
   recv_wr.wr_cqe = &response->cqe;
   recv_wr.next = NULL;
   recv_wr.sg_list = &response->sge;
   recv_wr.num_sge = 1;
-  rc = ib_post_recv(info->id->qp, &recv_wr, &recv_wr_fail);
+  rc = ib_post_recv(info->id->qp, &recv_wr, NULL);
   if (rc) {
     ib_dma_unmap_single(info->id->device, response->sge.addr, response->sge.length, DMA_FROM_DEVICE);
     smbd_disconnect_rdma_connection(info);
     log_rdma_recv(ERR, "ib_post_recv failed rc=%d\n", rc);
   }
   return rc;
 }<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,35 +1,35 @@
 static int smbd_post_send(struct smbd_connection *info, struct smbd_request *request, bool has_payload) {
-  struct ib_send_wr send_wr, *send_wr_fail;
+  struct ib_send_wr send_wr;
   int rc, i;
   for (i = 0; i < request->num_sge; i++) {
     log_rdma_send(INFO, "rdma_request sge[%d] addr=%llu length=%u\n", i, request->sge[i].addr, request->sge[i].length);
     ib_dma_sync_single_for_device(info->id->device, request->sge[i].addr, request->sge[i].length, DMA_TO_DEVICE);
   }
   request->cqe.done = send_done;
   send_wr.next = NULL;
   send_wr.wr_cqe = &request->cqe;
   send_wr.sg_list = request->sge;
   send_wr.num_sge = request->num_sge;
   send_wr.opcode = IB_WR_SEND;
   send_wr.send_flags = IB_SEND_SIGNALED;
   if (has_payload) {
     request->has_payload = true;
     atomic_inc(&info->send_payload_pending);
   } else {
     request->has_payload = false;
     atomic_inc(&info->send_pending);
   }
-  rc = ib_post_send(info->id->qp, &send_wr, &send_wr_fail);
+  rc = ib_post_send(info->id->qp, &send_wr, NULL);
   if (rc) {
     log_rdma_send(ERR, "ib_post_send failed rc=%d\n", rc);
     if (has_payload) {
       if (atomic_dec_and_test(&info->send_payload_pending)) wake_up(&info->wait_send_payload_pending);
     } else {
       if (atomic_dec_and_test(&info->send_pending)) wake_up(&info->wait_send_pending);
     }
     smbd_disconnect_rdma_connection(info);
   } else
     /* Reset timer for idle connection after packet is sent */
     mod_delayed_work(info->workqueue, &info->idle_timer_work, info->keep_alive_interval * HZ);
   return rc;
 }<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,46 +1,46 @@
 static int smbd_post_send_negotiate_req(struct smbd_connection *info) {
-  struct ib_send_wr send_wr, *send_wr_fail;
+  struct ib_send_wr send_wr;
   int rc = -ENOMEM;
   struct smbd_request *request;
   struct smbd_negotiate_req *packet;
   request = mempool_alloc(info->request_mempool, GFP_KERNEL);
   if (!request) return rc;
   request->info = info;
   packet = smbd_request_payload(request);
   packet->min_version = cpu_to_le16(SMBD_V1);
   packet->max_version = cpu_to_le16(SMBD_V1);
   packet->reserved = 0;
   packet->credits_requested = cpu_to_le16(info->send_credit_target);
   packet->preferred_send_size = cpu_to_le32(info->max_send_size);
   packet->max_receive_size = cpu_to_le32(info->max_receive_size);
   packet->max_fragmented_size = cpu_to_le32(info->max_fragmented_recv_size);
   request->num_sge = 1;
   request->sge[0].addr = ib_dma_map_single(info->id->device, (void *)packet, sizeof(*packet), DMA_TO_DEVICE);
   if (ib_dma_mapping_error(info->id->device, request->sge[0].addr)) {
     rc = -EIO;
     goto dma_mapping_failed;
   }
   request->sge[0].length = sizeof(*packet);
   request->sge[0].lkey = info->pd->local_dma_lkey;
   ib_dma_sync_single_for_device(info->id->device, request->sge[0].addr, request->sge[0].length, DMA_TO_DEVICE);
   request->cqe.done = send_done;
   send_wr.next = NULL;
   send_wr.wr_cqe = &request->cqe;
   send_wr.sg_list = request->sge;
   send_wr.num_sge = request->num_sge;
   send_wr.opcode = IB_WR_SEND;
   send_wr.send_flags = IB_SEND_SIGNALED;
   log_rdma_send(INFO, "sge addr=%llx length=%x lkey=%x\n", request->sge[0].addr, request->sge[0].length, request->sge[0].lkey);
   request->has_payload = false;
   atomic_inc(&info->send_pending);
-  rc = ib_post_send(info->id->qp, &send_wr, &send_wr_fail);
+  rc = ib_post_send(info->id->qp, &send_wr, NULL);
   if (!rc) return 0;
   /* if we reach here, post send failed */
   log_rdma_send(ERR, "ib_post_send failed rc=%d\n", rc);
   atomic_dec(&info->send_pending);
   ib_dma_unmap_single(info->id->device, request->sge[0].addr, request->sge[0].length, DMA_TO_DEVICE);
   smbd_disconnect_rdma_connection(info);
 dma_mapping_failed:
   mempool_free(request, info->request_mempool);
   return rc;
 }<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,19 +1,19 @@
 static int post_recv(struct p9_client *client, struct p9_rdma_context *c) {
   struct p9_trans_rdma *rdma = client->trans;
-  struct ib_recv_wr wr, *bad_wr;
+  struct ib_recv_wr wr;
   struct ib_sge sge;
   c->busa = ib_dma_map_single(rdma->cm_id->device, c->rc->sdata, client->msize, DMA_FROM_DEVICE);
   if (ib_dma_mapping_error(rdma->cm_id->device, c->busa)) goto error;
   c->cqe.done = recv_done;
   sge.addr = c->busa;
   sge.length = client->msize;
   sge.lkey = rdma->pd->local_dma_lkey;
   wr.next = NULL;
   wr.wr_cqe = &c->cqe;
   wr.sg_list = &sge;
   wr.num_sge = 1;
-  return ib_post_recv(rdma->qp, &wr, &bad_wr);
+  return ib_post_recv(rdma->qp, &wr, NULL);
 error:
   p9_debug(P9_DEBUG_ERROR, "EIO\n");
   return -EIO;
 }<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,25 +1,24 @@
 static int smc_tx_rdma_write(struct smc_connection *conn, int peer_rmbe_offset, int num_sges, struct ib_sge sges[]) {
   struct smc_link_group *lgr = conn->lgr;
-  struct ib_send_wr *failed_wr = NULL;
   struct ib_rdma_wr rdma_wr;
   struct smc_link *link;
   int rc;
   memset(&rdma_wr, 0, sizeof(rdma_wr));
   link = &lgr->lnk[SMC_SINGLE_LINK];
   rdma_wr.wr.wr_id = smc_wr_tx_get_next_wr_id(link);
   rdma_wr.wr.sg_list = sges;
   rdma_wr.wr.num_sge = num_sges;
   rdma_wr.wr.opcode = IB_WR_RDMA_WRITE;
   rdma_wr.remote_addr = lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].dma_addr +
                         /* RMBE within RMB */
                         conn->tx_off +
                         /* offset within RMBE */
                         peer_rmbe_offset;
   rdma_wr.rkey = lgr->rtokens[conn->rtoken_idx][SMC_SINGLE_LINK].rkey;
-  rc = ib_post_send(link->roce_qp, &rdma_wr.wr, &failed_wr);
+  rc = ib_post_send(link->roce_qp, &rdma_wr.wr, NULL);
   if (rc) {
     conn->local_tx_ctrl.conn_state_flags.peer_conn_abort = 1;
     smc_lgr_terminate(lgr);
   }
   return rc;
 }<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,27 +1,25 @@
 int smc_wr_reg_send(struct smc_link *link, struct ib_mr *mr) {
-  struct ib_send_wr *failed_wr = NULL;
   int rc;
   ib_req_notify_cq(link->smcibdev->roce_cq_send, IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS);
   link->wr_reg_state = POSTED;
   link->wr_reg.wr.wr_id = (u64)(uintptr_t)mr;
   link->wr_reg.mr = mr;
   link->wr_reg.key = mr->rkey;
-  failed_wr = &link->wr_reg.wr;
-  rc = ib_post_send(link->roce_qp, &link->wr_reg.wr, &failed_wr);
+  rc = ib_post_send(link->roce_qp, &link->wr_reg.wr, NULL);
   if (rc) return rc;
   rc = wait_event_interruptible_timeout(link->wr_reg_wait, (link->wr_reg_state != POSTED), SMC_WR_REG_MR_WAIT_TIME);
   if (!rc) {
     /* timeout - terminate connections */
     struct smc_link_group *lgr;
     lgr = container_of(link, struct smc_link_group, lnk[SMC_SINGLE_LINK]);
     smc_lgr_terminate(lgr);
     return -EPIPE;
   }
   if (rc == -ERESTARTSYS) return -EINTR;
   switch (link->wr_reg_state) {
   case CONFIRMED: rc = 0; break;
   case FAILED: rc = -EIO; break;
   case POSTED: rc = -EPIPE; break;
   }
   return rc;
 }<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,14 +1,13 @@
 int smc_wr_tx_send(struct smc_link *link, struct smc_wr_tx_pend_priv *priv) {
-  struct ib_send_wr *failed_wr = NULL;
   struct smc_wr_tx_pend *pend;
   int rc;
   ib_req_notify_cq(link->smcibdev->roce_cq_send, IB_CQ_NEXT_COMP | IB_CQ_REPORT_MISSED_EVENTS);
   pend = container_of(priv, struct smc_wr_tx_pend, priv);
-  rc = ib_post_send(link->roce_qp, &link->wr_tx_ibs[pend->idx], &failed_wr);
+  rc = ib_post_send(link->roce_qp, &link->wr_tx_ibs[pend->idx], NULL);
   if (rc) {
     struct smc_link_group *lgr = container_of(link, struct smc_link_group, lnk[SMC_SINGLE_LINK]);
     smc_wr_tx_put_slot(link, priv);
     smc_lgr_terminate(lgr);
   }
   return rc;
 }<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,4 +1 @@
-static int fmr_op_send(struct rpcrdma_ia *ia, struct rpcrdma_req *req) {
-  struct ib_send_wr *bad_wr;
-  return ib_post_send(ia->ri_id->qp, &req->rl_sendctx->sc_wr, &bad_wr);
-}
+static int fmr_op_send(struct rpcrdma_ia *ia, struct rpcrdma_req *req) { return ib_post_send(ia->ri_id->qp, &req->rl_sendctx->sc_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,20 +1,20 @@
 static int frwr_op_send(struct rpcrdma_ia *ia, struct rpcrdma_req *req) {
-  struct ib_send_wr *post_wr, *bad_wr;
+  struct ib_send_wr *post_wr;
   struct rpcrdma_mr *mr;
   post_wr = &req->rl_sendctx->sc_wr;
   list_for_each_entry(mr, &req->rl_registered, mr_list) {
     struct rpcrdma_frwr *frwr;
     frwr = &mr->frwr;
     frwr->fr_cqe.done = frwr_wc_fastreg;
     frwr->fr_regwr.wr.next = post_wr;
     frwr->fr_regwr.wr.wr_cqe = &frwr->fr_cqe;
     frwr->fr_regwr.wr.num_sge = 0;
     frwr->fr_regwr.wr.opcode = IB_WR_REG_MR;
     frwr->fr_regwr.wr.send_flags = 0;
     post_wr = &frwr->fr_regwr.wr;
   }
   /* If ib_post_send fails, the next ->send_request for
    * @req will queue these MWs for recovery.
    */
-  return ib_post_send(ia->ri_id->qp, post_wr, &bad_wr);
+  return ib_post_send(ia->ri_id->qp, post_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,13 +1,12 @@
 static int __svc_rdma_post_recv(struct svcxprt_rdma *rdma, struct svc_rdma_recv_ctxt *ctxt) {
-  struct ib_recv_wr *bad_recv_wr;
   int ret;
   svc_xprt_get(&rdma->sc_xprt);
-  ret = ib_post_recv(rdma->sc_qp, &ctxt->rc_recv_wr, &bad_recv_wr);
+  ret = ib_post_recv(rdma->sc_qp, &ctxt->rc_recv_wr, NULL);
   trace_svcrdma_post_recv(&ctxt->rc_recv_wr, ret);
   if (ret) goto err_post;
   return 0;
 err_post:
   svc_rdma_recv_ctxt_put(rdma, ctxt);
   svc_xprt_put(&rdma->sc_xprt);
   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,27 +1,26 @@
 int svc_rdma_send(struct svcxprt_rdma *rdma, struct ib_send_wr *wr) {
-  struct ib_send_wr *bad_wr;
   int ret;
   might_sleep();
   /* If the SQ is full, wait until an SQ entry is available */
   while (1) {
     if ((atomic_dec_return(&rdma->sc_sq_avail) < 0)) {
       atomic_inc(&rdma_stat_sq_starve);
       trace_svcrdma_sq_full(rdma);
       atomic_inc(&rdma->sc_sq_avail);
       wait_event(rdma->sc_send_wait, atomic_read(&rdma->sc_sq_avail) > 1);
       if (test_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags)) return -ENOTCONN;
       trace_svcrdma_sq_retry(rdma);
       continue;
     }
     svc_xprt_get(&rdma->sc_xprt);
-    ret = ib_post_send(rdma->sc_qp, wr, &bad_wr);
+    ret = ib_post_send(rdma->sc_qp, wr, NULL);
     trace_svcrdma_post_send(wr, ret);
     if (ret) {
       set_bit(XPT_CLOSE, &rdma->sc_xprt.xpt_flags);
       svc_xprt_put(&rdma->sc_xprt);
       wake_up(&rdma->sc_send_wait);
     }
     break;
   }
   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,65 +1,65 @@
 static int __init cmx270_init(void) {
   struct nand_chip *this;
   int ret;
   if (!(machine_is_armcore() && cpu_is_pxa27x())) return -ENODEV;
   ret = gpio_request(GPIO_NAND_CS, "NAND CS");
   if (ret) {
     pr_warn("CM-X270: failed to request NAND CS gpio\n");
     return ret;
   }
   gpio_direction_output(GPIO_NAND_CS, 1);
   ret = gpio_request(GPIO_NAND_RB, "NAND R/B");
   if (ret) {
     pr_warn("CM-X270: failed to request NAND R/B gpio\n");
     goto err_gpio_request;
   }
   gpio_direction_input(GPIO_NAND_RB);
   /* Allocate memory for MTD device structure and private data */
   this = kzalloc(sizeof(struct nand_chip), GFP_KERNEL);
   if (!this) {
     ret = -ENOMEM;
     goto err_kzalloc;
   }
   cmx270_nand_io = ioremap(PXA_CS1_PHYS, 12);
   if (!cmx270_nand_io) {
     pr_debug("Unable to ioremap NAND device\n");
     ret = -EINVAL;
     goto err_ioremap;
   }
   cmx270_nand_mtd = nand_to_mtd(this);
   /* Link the private data with the MTD structure */
   cmx270_nand_mtd->owner = THIS_MODULE;
   /* insert callbacks */
   this->IO_ADDR_R = cmx270_nand_io;
   this->IO_ADDR_W = cmx270_nand_io;
   this->cmd_ctrl = cmx270_hwcontrol;
   this->dev_ready = cmx270_device_ready;
   /* 15 us command delay time */
   this->chip_delay = 20;
   this->ecc.mode = NAND_ECC_SOFT;
   this->ecc.algo = NAND_ECC_HAMMING;
   /* read/write functions */
   this->read_byte = cmx270_read_byte;
   this->read_buf = cmx270_read_buf;
   this->write_buf = cmx270_write_buf;
   /* Scan to find existence of the device */
   ret = nand_scan(cmx270_nand_mtd, 1);
   if (ret) {
     pr_notice("No NAND device\n");
     goto err_scan;
   }
   /* Register the partitions */
-  ret = mtd_device_parse_register(cmx270_nand_mtd, NULL, NULL, partition_info, NUM_PARTITIONS);
+  ret = mtd_device_register(cmx270_nand_mtd, partition_info, NUM_PARTITIONS);
   if (ret) goto err_scan;
   /* Return happy */
   return 0;
 err_scan:
   iounmap(cmx270_nand_io);
 err_ioremap:
   kfree(this);
 err_kzalloc:
   gpio_free(GPIO_NAND_RB);
 err_gpio_request:
   gpio_free(GPIO_NAND_CS);
   return ret;
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)
--- initial
+++ final
@@ -1,31 +1,31 @@
 static int __init cs553x_init(void) {
   int err = -ENXIO;
   int i;
   uint64_t val;
   /* If the CPU isn't a Geode GX or LX, abort */
   if (!is_geode()) return -ENXIO;
   /* If it doesn't have the CS553[56], abort */
   rdmsrl(MSR_DIVIL_GLD_CAP, val);
   val &= ~0xFFULL;
   if (val != CAP_CS5535 && val != CAP_CS5536) return -ENXIO;
   /* If it doesn't have the NAND controller enabled, abort */
   rdmsrl(MSR_DIVIL_BALL_OPTS, val);
   if (val & PIN_OPT_IDE) {
     pr_info("CS553x NAND controller: Flash I/O not enabled in MSR_DIVIL_BALL_OPTS.\n");
     return -ENXIO;
   }
   for (i = 0; i < NR_CS553X_CONTROLLERS; i++) {
     rdmsrl(MSR_DIVIL_LBAR_FLSH0 + i, val);
     if ((val & (FLSH_LBAR_EN | FLSH_NOR_NAND)) == (FLSH_LBAR_EN | FLSH_NOR_NAND)) err = cs553x_init_one(i, !!(val & FLSH_MEM_IO), val & 0xFFFFFFFF);
   }
   /* Register all devices together here. This means we can easily hack it to
      do mtdconcat etc. if we want to. */
   for (i = 0; i < NR_CS553X_CONTROLLERS; i++) {
     if (cs553x_mtd[i]) {
       /* If any devices registered, return success. Else the last error. */
-      mtd_device_parse_register(cs553x_mtd[i], NULL, NULL, NULL, 0);
+      mtd_device_register(cs553x_mtd[i], NULL, 0);
       err = 0;
     }
   }
   return err;
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)
--- initial
+++ final
@@ -1,8 +1,8 @@
 static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info, struct s3c2410_nand_mtd *mtd, struct s3c2410_nand_set *set) {
   if (set) {
     struct mtd_info *mtdinfo = nand_to_mtd(&mtd->chip);
     mtdinfo->name = set->name;
-    return mtd_device_parse_register(mtdinfo, NULL, NULL, set->partitions, set->nr_partitions);
+    return mtd_device_register(mtdinfo, set->partitions, set->nr_partitions);
   }
   return -ENODEV;
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)
--- initial
+++ final
@@ -1,36 +1,36 @@
 static int generic_onenand_probe(struct platform_device *pdev) {
   struct onenand_info *info;
   struct onenand_platform_data *pdata = dev_get_platdata(&pdev->dev);
   struct resource *res = pdev->resource;
   unsigned long size = resource_size(res);
   int err;
   info = kzalloc(sizeof(struct onenand_info), GFP_KERNEL);
   if (!info) return -ENOMEM;
   if (!request_mem_region(res->start, size, dev_name(&pdev->dev))) {
     err = -EBUSY;
     goto out_free_info;
   }
   info->onenand.base = ioremap(res->start, size);
   if (!info->onenand.base) {
     err = -ENOMEM;
     goto out_release_mem_region;
   }
   info->onenand.mmcontrol = pdata ? pdata->mmcontrol : NULL;
   info->onenand.irq = platform_get_irq(pdev, 0);
   info->mtd.dev.parent = &pdev->dev;
   info->mtd.priv = &info->onenand;
   if (onenand_scan(&info->mtd, 1)) {
     err = -ENXIO;
     goto out_iounmap;
   }
-  err = mtd_device_parse_register(&info->mtd, NULL, NULL, pdata ? pdata->parts : NULL, pdata ? pdata->nr_parts : 0);
+  err = mtd_device_register(&info->mtd, pdata ? pdata->parts : NULL, pdata ? pdata->nr_parts : 0);
   platform_set_drvdata(pdev, info);
   return 0;
 out_iounmap:
   iounmap(info->onenand.base);
 out_release_mem_region:
   release_mem_region(res->start, size);
 out_free_info:
   kfree(info);
   return err;
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)
--- initial
+++ final
@@ -1,35 +1,35 @@
 static int __init init_impa7(void) {
   const char *const *type;
   int i;
   static struct {
     u_long addr;
     u_long size;
   } pt[NUM_FLASHBANKS] = {
       {WINDOW_ADDR0, WINDOW_SIZE0},
       {WINDOW_ADDR1, WINDOW_SIZE1},
   };
   int devicesfound = 0;
   for (i = 0; i < NUM_FLASHBANKS; i++) {
     printk(KERN_NOTICE MSG_PREFIX "probing 0x%08lx at 0x%08lx\n", pt[i].size, pt[i].addr);
     impa7_map[i].phys = pt[i].addr;
     impa7_map[i].virt = ioremap(pt[i].addr, pt[i].size);
     if (!impa7_map[i].virt) {
       printk(MSG_PREFIX "failed to ioremap\n");
       return -EIO;
     }
     simple_map_init(&impa7_map[i]);
     impa7_mtd[i] = NULL;
     type = rom_probe_types;
     for (; !impa7_mtd[i] && *type; type++) {
       impa7_mtd[i] = do_map_probe(*type, &impa7_map[i]);
     }
     if (impa7_mtd[i]) {
       impa7_mtd[i]->owner = THIS_MODULE;
       devicesfound++;
-      mtd_device_parse_register(impa7_mtd[i], NULL, NULL, partitions, ARRAY_SIZE(partitions));
+      mtd_device_register(impa7_mtd[i], partitions, ARRAY_SIZE(partitions));
     } else {
       iounmap((void __iomem *)impa7_map[i].virt);
     }
   }
   return devicesfound == 0 ? -ENXIO : 0;
 }<sep>@@
expression e1,e2,e3;
@@
-       mtd_device_parse_register
+       mtd_device_register
         (e1,
-                                      NULL, NULL,
                                       e2,e3)