imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,16 +1,16 @@
 static struct pgpath *choose_path_in_pg(struct multipath *m, struct priority_group *pg, size_t nr_bytes) {
   unsigned long flags;
   struct dm_path *path;
   struct pgpath *pgpath;
   path = pg->ps.type->select_path(&pg->ps, nr_bytes);
   if (!path) return ERR_PTR(-ENXIO);
   pgpath = path_to_pgpath(path);
-  if (unlikely(lockless_dereference(m->current_pg) != pg)) {
+  if (unlikely(READ_ONCE(m->current_pg) != pg)) {
     /* Only update current_pgpath if pg changed */
     spin_lock_irqsave(&m->lock, flags);
     m->current_pgpath = pgpath;
     __switch_pg(m, pg);
     spin_unlock_irqrestore(&m->lock, flags);
   }
   return pgpath;
 }<sep>@@
expression e1;
@@
-               lockless_dereference
+               READ_ONCE
		(e1)
--- initial
+++ final
@@ -1,52 +1,52 @@
 static struct pgpath *choose_pgpath(struct multipath *m, size_t nr_bytes) {
   unsigned long flags;
   struct priority_group *pg;
   struct pgpath *pgpath;
   unsigned bypassed = 1;
   if (!atomic_read(&m->nr_valid_paths)) {
     clear_bit(MPATHF_QUEUE_IO, &m->flags);
     goto failed;
   }
   /* Were we instructed to switch PG? */
-  if (lockless_dereference(m->next_pg)) {
+  if (READ_ONCE(m->next_pg)) {
     spin_lock_irqsave(&m->lock, flags);
     pg = m->next_pg;
     if (!pg) {
       spin_unlock_irqrestore(&m->lock, flags);
       goto check_current_pg;
     }
     m->next_pg = NULL;
     spin_unlock_irqrestore(&m->lock, flags);
     pgpath = choose_path_in_pg(m, pg, nr_bytes);
     if (!IS_ERR_OR_NULL(pgpath)) return pgpath;
   }
   /* Don't change PG until it has no remaining paths */
 check_current_pg:
-  pg = lockless_dereference(m->current_pg);
+  pg = READ_ONCE(m->current_pg);
   if (pg) {
     pgpath = choose_path_in_pg(m, pg, nr_bytes);
     if (!IS_ERR_OR_NULL(pgpath)) return pgpath;
   }
   /*
    * Loop through priority groups until we find a valid path.
    * First time we skip PGs marked 'bypassed'.
    * Second time we only try the ones we skipped, but set
    * pg_init_delay_retry so we do not hammer controllers.
    */
   do {
     list_for_each_entry(pg, &m->priority_groups, list) {
       if (pg->bypassed == !!bypassed) continue;
       pgpath = choose_path_in_pg(m, pg, nr_bytes);
       if (!IS_ERR_OR_NULL(pgpath)) {
         if (!bypassed) set_bit(MPATHF_PG_INIT_DELAY_RETRY, &m->flags);
         return pgpath;
       }
     }
   } while (bypassed--);
 failed:
   spin_lock_irqsave(&m->lock, flags);
   m->current_pgpath = NULL;
   m->current_pg = NULL;
   spin_unlock_irqrestore(&m->lock, flags);
   return NULL;
 }<sep>@@
expression e1;
@@
-               lockless_dereference
+               READ_ONCE
		(e1)
--- initial
+++ final
@@ -1,47 +1,47 @@
 static int multipath_busy(struct dm_target *ti) {
   bool busy = false, has_active = false;
   struct multipath *m = ti->private;
   struct priority_group *pg, *next_pg;
   struct pgpath *pgpath;
   /* pg_init in progress */
   if (atomic_read(&m->pg_init_in_progress)) return true;
   /* no paths available, for blk-mq: rely on IO mapping to delay requeue */
   if (!atomic_read(&m->nr_valid_paths) && test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) return (m->queue_mode != DM_TYPE_MQ_REQUEST_BASED);
   /* Guess which priority_group will be used at next mapping time */
-  pg = lockless_dereference(m->current_pg);
-  next_pg = lockless_dereference(m->next_pg);
-  if (unlikely(!lockless_dereference(m->current_pgpath) && next_pg)) pg = next_pg;
+  pg = READ_ONCE(m->current_pg);
+  next_pg = READ_ONCE(m->next_pg);
+  if (unlikely(!READ_ONCE(m->current_pgpath) && next_pg)) pg = next_pg;
   if (!pg) {
     /*
      * We don't know which pg will be used at next mapping time.
      * We don't call choose_pgpath() here to avoid to trigger
      * pg_init just by busy checking.
      * So we don't know whether underlying devices we will be using
      * at next mapping time are busy or not. Just try mapping.
      */
     return busy;
   }
   /*
    * If there is one non-busy active path at least, the path selector
    * will be able to select it. So we consider such a pg as not busy.
    */
   busy = true;
   list_for_each_entry(pgpath, &pg->pgpaths, list) {
     if (pgpath->is_active) {
       has_active = true;
       if (!pgpath_busy(pgpath)) {
         busy = false;
         break;
       }
     }
   }
   if (!has_active) {
     /*
      * No active path in this pg, so this pg won't be used and
      * the current_pg will be changed at next mapping time.
      * We need to try mapping to determine it.
      */
     busy = false;
   }
   return busy;
 }<sep>@@
expression e1;
@@
-               lockless_dereference
+               READ_ONCE
		(e1)
--- initial
+++ final
@@ -1,42 +1,42 @@
 static int multipath_clone_and_map(struct dm_target *ti, struct request *rq, union map_info *map_context, struct request **__clone) {
   struct multipath *m = ti->private;
   size_t nr_bytes = blk_rq_bytes(rq);
   struct pgpath *pgpath;
   struct block_device *bdev;
   struct dm_mpath_io *mpio = get_mpio(map_context);
   struct request_queue *q;
   struct request *clone;
   /* Do we need to select a new pgpath? */
-  pgpath = lockless_dereference(m->current_pgpath);
+  pgpath = READ_ONCE(m->current_pgpath);
   if (!pgpath || !test_bit(MPATHF_QUEUE_IO, &m->flags)) pgpath = choose_pgpath(m, nr_bytes);
   if (!pgpath) {
     if (test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) return DM_MAPIO_DELAY_REQUEUE;
     dm_report_EIO(m); /* Failed */
     return DM_MAPIO_KILL;
   } else if (test_bit(MPATHF_QUEUE_IO, &m->flags) || test_bit(MPATHF_PG_INIT_REQUIRED, &m->flags)) {
     if (pg_init_all_paths(m)) return DM_MAPIO_DELAY_REQUEUE;
     return DM_MAPIO_REQUEUE;
   }
   memset(mpio, 0, sizeof(*mpio));
   mpio->pgpath = pgpath;
   mpio->nr_bytes = nr_bytes;
   bdev = pgpath->path.dev->bdev;
   q = bdev_get_queue(bdev);
   clone = blk_get_request(q, rq->cmd_flags | REQ_NOMERGE, GFP_ATOMIC);
   if (IS_ERR(clone)) {
     /* EBUSY, ENODEV or EWOULDBLOCK: requeue */
     bool queue_dying = blk_queue_dying(q);
     DMERR_LIMIT("blk_get_request() returned %ld%s - requeuing", PTR_ERR(clone), queue_dying ? " (path offline)" : "");
     if (queue_dying) {
       atomic_inc(&m->pg_init_in_progress);
       activate_or_offline_path(pgpath);
     }
     return DM_MAPIO_DELAY_REQUEUE;
   }
   clone->bio = clone->biotail = NULL;
   clone->rq_disk = bdev->bd_disk;
   clone->cmd_flags |= REQ_FAILFAST_TRANSPORT;
   *__clone = clone;
   if (pgpath->pg->ps.type->start_io) pgpath->pg->ps.type->start_io(&pgpath->pg->ps, &pgpath->path, nr_bytes);
   return DM_MAPIO_REMAPPED;
 }<sep>@@
expression e1;
@@
-               lockless_dereference
+               READ_ONCE
		(e1)
--- initial
+++ final
@@ -1,37 +1,37 @@
 static int multipath_prepare_ioctl(struct dm_target *ti, struct block_device **bdev, fmode_t *mode) {
   struct multipath *m = ti->private;
   struct pgpath *current_pgpath;
   int r;
-  current_pgpath = lockless_dereference(m->current_pgpath);
+  current_pgpath = READ_ONCE(m->current_pgpath);
   if (!current_pgpath) current_pgpath = choose_pgpath(m, 0);
   if (current_pgpath) {
     if (!test_bit(MPATHF_QUEUE_IO, &m->flags)) {
       *bdev = current_pgpath->path.dev->bdev;
       *mode = current_pgpath->path.dev->mode;
       r = 0;
     } else {
       /* pg_init has not started or completed */
       r = -ENOTCONN;
     }
   } else {
     /* No path is available */
     if (test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags))
       r = -ENOTCONN;
     else
       r = -EIO;
   }
   if (r == -ENOTCONN) {
-    if (!lockless_dereference(m->current_pg)) {
+    if (!READ_ONCE(m->current_pg)) {
       /* Path status changed, redo selection */
       (void)choose_pgpath(m, 0);
     }
     if (test_bit(MPATHF_PG_INIT_REQUIRED, &m->flags)) pg_init_all_paths(m);
     dm_table_run_md_queue_async(m->ti->table);
     process_queued_io_list(m);
   }
   /*
    * Only pass ioctls through if the device sizes match exactly.
    */
   if (!r && ti->len != i_size_read((*bdev)->bd_inode) >> SECTOR_SHIFT) return 1;
   return r;
 }<sep>@@
expression e1;
@@
-               lockless_dereference
+               READ_ONCE
		(e1)
--- initial
+++ final
@@ -1,19 +1,19 @@
 static unsigned long get_segment_base(unsigned int segment) {
   struct desc_struct *desc;
   unsigned int idx = segment >> 3;
   if ((segment & SEGMENT_TI_MASK) == SEGMENT_LDT) {
 #ifdef CONFIG_MODIFY_LDT_SYSCALL
     struct ldt_struct *ldt;
     /* IRQs are off, so this synchronizes with smp_store_release */
-    ldt = lockless_dereference(current->active_mm->context.ldt);
+    ldt = READ_ONCE(current->active_mm->context.ldt);
     if (!ldt || idx >= ldt->nr_entries) return 0;
     desc = &ldt->entries[idx];
 #else
     return 0;
 #endif
   } else {
     if (idx >= GDT_ENTRIES) return 0;
     desc = raw_cpu_ptr(gdt_page.gdt) + idx;
   }
   return get_desc_base(desc);
 }<sep>@@
expression e1;
@@
-               lockless_dereference
+               READ_ONCE
		(e1)
--- initial
+++ final
@@ -1,31 +1,31 @@
 static int ovl_dir_fsync(struct file *file, loff_t start, loff_t end, int datasync) {
   struct ovl_dir_file *od = file->private_data;
   struct dentry *dentry = file->f_path.dentry;
   struct file *realfile = od->realfile;
   /*
    * Need to check if we started out being a lower dir, but got copied up
    */
   if (!od->is_upper && OVL_TYPE_UPPER(ovl_path_type(dentry))) {
     struct inode *inode = file_inode(file);
-    realfile = lockless_dereference(od->upperfile);
+    realfile = READ_ONCE(od->upperfile);
     if (!realfile) {
       struct path upperpath;
       ovl_path_upper(dentry, &upperpath);
       realfile = ovl_path_open(&upperpath, O_RDONLY);
       inode_lock(inode);
       if (!od->upperfile) {
         if (IS_ERR(realfile)) {
           inode_unlock(inode);
           return PTR_ERR(realfile);
         }
         smp_store_release(&od->upperfile, realfile);
       } else {
         /* somebody has beaten us to it */
         if (!IS_ERR(realfile)) fput(realfile);
         realfile = od->upperfile;
       }
       inode_unlock(inode);
     }
   }
   return vfs_fsync_range(realfile, start, end, datasync);
 }<sep>@@
expression e1;
@@
-               lockless_dereference
+               READ_ONCE
		(e1)
--- initial
+++ final
@@ -1,24 +1,24 @@
 static u32 seccomp_run_filters(const struct seccomp_data *sd, struct seccomp_filter **match) {
   struct seccomp_data sd_local;
   u32 ret = SECCOMP_RET_ALLOW;
   /* Make sure cross-thread synced filter points somewhere sane. */
-  struct seccomp_filter *f = lockless_dereference(current->seccomp.filter);
+  struct seccomp_filter *f = READ_ONCE(current->seccomp.filter);
   /* Ensure unexpected behavior doesn't result in failing open. */
   if (unlikely(WARN_ON(f == NULL))) return SECCOMP_RET_KILL_PROCESS;
   if (!sd) {
     populate_seccomp_data(&sd_local);
     sd = &sd_local;
   }
   /*
    * All filters in the list are evaluated and the lowest BPF return
    * value always takes priority (ignoring the DATA).
    */
   for (; f; f = f->prev) {
     u32 cur_ret = BPF_PROG_RUN(f->prog, sd);
     if (ACTION_ONLY(cur_ret) < ACTION_ONLY(ret)) {
       ret = cur_ret;
       *match = f;
     }
   }
   return ret;
 }<sep>@@
expression e1;
@@
-               lockless_dereference
+               READ_ONCE
		(e1)
--- initial
+++ final
@@ -1,21 +1,21 @@
 struct callback_head *task_work_cancel(struct task_struct *task, task_work_func_t func) {
   struct callback_head **pprev = &task->task_works;
   struct callback_head *work;
   unsigned long flags;
   if (likely(!task->task_works)) return NULL;
   /*
    * If cmpxchg() fails we continue without updating pprev.
    * Either we raced with task_work_add() which added the
    * new entry before this work, we will find it again. Or
    * we raced with task_work_run(), *pprev == NULL/exited.
    */
   raw_spin_lock_irqsave(&task->pi_lock, flags);
-  while ((work = lockless_dereference(*pprev))) {
+  while ((work = READ_ONCE(*pprev))) {
     if (work->func != func)
       pprev = &work->next;
     else if (cmpxchg(pprev, work, work->next) == work)
       break;
   }
   raw_spin_unlock_irqrestore(&task->pi_lock, flags);
   return work;
 }<sep>@@
expression e1;
@@
-               lockless_dereference
+               READ_ONCE
		(e1)
--- initial
+++ final
@@ -1,16 +1,16 @@
 static void nvkm_vm_unmap_pgt(struct nvkm_vm *vm, int big, u32 fpde, u32 lpde) {
   struct nvkm_mmu *mmu = vm->mmu;
   struct nvkm_vm_pgd *vpgd;
   struct nvkm_vm_pgt *vpgt;
   struct nvkm_memory *pgt;
   u32 pde;
   for (pde = fpde; pde <= lpde; pde++) {
     vpgt = &vm->pgt[pde - vm->fpde];
     if (--vpgt->refcount[big]) continue;
     pgt = vpgt->mem[big];
     vpgt->mem[big] = NULL;
     list_for_each_entry(vpgd, &vm->pgd_list, head) { mmu->func->map_pgt(vpgd->obj, pde, vpgt->mem); }
     mmu->func->flush(vm);
-    nvkm_memory_del(&pgt);
+    nvkm_memory_unref(&pgt);
   }
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,16 +1,16 @@
 static int nvkm_falcon_fini(struct nvkm_engine *engine, bool suspend) {
   struct nvkm_falcon *falcon = nvkm_falcon(engine);
   struct nvkm_device *device = falcon->engine.subdev.device;
   const u32 base = falcon->addr;
   if (!suspend) {
-    nvkm_memory_del(&falcon->core);
+    nvkm_memory_unref(&falcon->core);
     if (falcon->external) {
       vfree(falcon->data.data);
       vfree(falcon->code.data);
       falcon->code.data = NULL;
     }
   }
   nvkm_mask(device, base + 0x048, 0x00000003, 0x00000000);
   nvkm_wr32(device, base + 0x014, 0xffffffff);
   return 0;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,12 +1,12 @@
 static void *nvkm_fb_dtor(struct nvkm_subdev *subdev) {
   struct nvkm_fb *fb = nvkm_fb(subdev);
   int i;
-  nvkm_memory_del(&fb->mmu_wr);
-  nvkm_memory_del(&fb->mmu_rd);
+  nvkm_memory_unref(&fb->mmu_wr);
+  nvkm_memory_unref(&fb->mmu_rd);
   for (i = 0; i < fb->tile.regions; i++)
     fb->func->tile.fini(fb, i, &fb->tile.region[i]);
   nvkm_mm_fini(&fb->tags);
   nvkm_ram_del(&fb->ram);
   if (fb->func->dtor) return fb->func->dtor(fb);
   return fb;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,8 +1,8 @@
 static void *gf100_fifo_dtor(struct nvkm_fifo *base) {
   struct gf100_fifo *fifo = gf100_fifo(base);
   nvkm_vm_put(&fifo->user.bar);
-  nvkm_memory_del(&fifo->user.mem);
-  nvkm_memory_del(&fifo->runlist.mem[0]);
-  nvkm_memory_del(&fifo->runlist.mem[1]);
+  nvkm_memory_unref(&fifo->user.mem);
+  nvkm_memory_unref(&fifo->runlist.mem[0]);
+  nvkm_memory_unref(&fifo->runlist.mem[1]);
   return fifo;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,6 +1,6 @@
 void *nv50_fifo_dtor(struct nvkm_fifo *base) {
   struct nv50_fifo *fifo = nv50_fifo(base);
-  nvkm_memory_del(&fifo->runlist[1]);
-  nvkm_memory_del(&fifo->runlist[0]);
+  nvkm_memory_unref(&fifo->runlist[1]);
+  nvkm_memory_unref(&fifo->runlist[0]);
   return fifo;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,13 +1,13 @@
 void *gf100_bar_dtor(struct nvkm_bar *base) {
   struct gf100_bar *bar = gf100_bar(base);
   nvkm_vm_ref(NULL, &bar->bar[1].vm, bar->bar[1].pgd);
   nvkm_gpuobj_del(&bar->bar[1].pgd);
-  nvkm_memory_del(&bar->bar[1].mem);
+  nvkm_memory_unref(&bar->bar[1].mem);
   if (bar->bar[0].vm) {
-    nvkm_memory_del(&bar->bar[0].vm->pgt[0].mem[0]);
+    nvkm_memory_unref(&bar->bar[0].vm->pgt[0].mem[0]);
     nvkm_vm_ref(NULL, &bar->bar[0].vm, bar->bar[0].pgd);
   }
   nvkm_gpuobj_del(&bar->bar[0].pgd);
-  nvkm_memory_del(&bar->bar[0].mem);
+  nvkm_memory_unref(&bar->bar[0].mem);
   return bar;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,11 +1,11 @@
 static void *gk104_fifo_dtor(struct nvkm_fifo *base) {
   struct gk104_fifo *fifo = gk104_fifo(base);
   int i;
   nvkm_vm_put(&fifo->user.bar);
-  nvkm_memory_del(&fifo->user.mem);
+  nvkm_memory_unref(&fifo->user.mem);
   for (i = 0; i < fifo->runlist_nr; i++) {
-    nvkm_memory_del(&fifo->runlist[i].mem[1]);
-    nvkm_memory_del(&fifo->runlist[i].mem[0]);
+    nvkm_memory_unref(&fifo->runlist[i].mem[1]);
+    nvkm_memory_unref(&fifo->runlist[i].mem[0]);
   }
   return fifo;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,10 +1,10 @@
 void nvkm_gpuobj_del(struct nvkm_gpuobj **pgpuobj) {
   struct nvkm_gpuobj *gpuobj = *pgpuobj;
   if (gpuobj) {
     if (gpuobj->parent) nvkm_mm_free(&gpuobj->parent->heap, &gpuobj->node);
     nvkm_mm_fini(&gpuobj->heap);
-    nvkm_memory_del(&gpuobj->memory);
+    nvkm_memory_unref(&gpuobj->memory);
     kfree(*pgpuobj);
     *pgpuobj = NULL;
   }
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,17 +1,17 @@
 static void *gf100_gr_chan_dtor(struct nvkm_object *object) {
   struct gf100_gr_chan *chan = gf100_gr_chan(object);
   int i;
   for (i = 0; i < ARRAY_SIZE(chan->data); i++) {
     if (chan->data[i].vma.node) {
       nvkm_vm_unmap(&chan->data[i].vma);
       nvkm_vm_put(&chan->data[i].vma);
     }
-    nvkm_memory_del(&chan->data[i].mem);
+    nvkm_memory_unref(&chan->data[i].mem);
   }
   if (chan->mmio_vma.node) {
     nvkm_vm_unmap(&chan->mmio_vma);
     nvkm_vm_put(&chan->mmio_vma);
   }
-  nvkm_memory_del(&chan->mmio);
+  nvkm_memory_unref(&chan->mmio);
   return chan;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,26 +1,26 @@
 int nvkm_instobj_new(struct nvkm_instmem *imem, u32 size, u32 align, bool zero, struct nvkm_memory **pmemory) {
   struct nvkm_subdev *subdev = &imem->subdev;
   struct nvkm_memory *memory = NULL;
   u32 offset;
   int ret;
   ret = imem->func->memory_new(imem, size, align, zero, &memory);
   if (ret) {
     nvkm_error(subdev, "OOM: %08x %08x %d\n", size, align, ret);
     goto done;
   }
   nvkm_trace(subdev, "new %08x %08x %d: %010llx %010llx\n", size, align, zero, nvkm_memory_addr(memory), nvkm_memory_size(memory));
   if (!imem->func->zero && zero) {
     void __iomem *map = nvkm_kmap(memory);
     if (unlikely(!map)) {
       for (offset = 0; offset < size; offset += 4)
         nvkm_wo32(memory, offset, 0x00000000);
     } else {
       memset_io(map, 0x00, size);
     }
     nvkm_done(memory);
   }
 done:
-  if (ret) nvkm_memory_del(&memory);
+  if (ret) nvkm_memory_unref(&memory);
   *pmemory = memory;
   return ret;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,9 +1,9 @@
 static void *nv04_instmem_dtor(struct nvkm_instmem *base) {
   struct nv04_instmem *imem = nv04_instmem(base);
-  nvkm_memory_del(&imem->base.ramfc);
-  nvkm_memory_del(&imem->base.ramro);
+  nvkm_memory_unref(&imem->base.ramfc);
+  nvkm_memory_unref(&imem->base.ramro);
   nvkm_ramht_del(&imem->base.ramht);
-  nvkm_memory_del(&imem->base.vbios);
+  nvkm_memory_unref(&imem->base.vbios);
   nvkm_mm_fini(&imem->heap);
   return imem;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,10 +1,10 @@
 void *nv04_mmu_dtor(struct nvkm_mmu *base) {
   struct nv04_mmu *mmu = nv04_mmu(base);
   struct nvkm_device *device = mmu->base.subdev.device;
   if (mmu->base.vmm) {
-    nvkm_memory_del(&mmu->base.vmm->pgt[0].mem[0]);
+    nvkm_memory_unref(&mmu->base.vmm->pgt[0].mem[0]);
     nvkm_vm_ref(NULL, &mmu->base.vmm, NULL);
   }
   if (mmu->nullp) { dma_free_coherent(device->dev, 16 * 1024, mmu->nullp, mmu->null); }
   return mmu;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,5 +1,5 @@
 void *nv20_gr_chan_dtor(struct nvkm_object *object) {
   struct nv20_gr_chan *chan = nv20_gr_chan(object);
-  nvkm_memory_del(&chan->inst);
+  nvkm_memory_unref(&chan->inst);
   return chan;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,5 +1,5 @@
 void *nv20_gr_dtor(struct nvkm_gr *base) {
   struct nv20_gr *gr = nv20_gr(base);
-  nvkm_memory_del(&gr->ctxtab);
+  nvkm_memory_unref(&gr->ctxtab);
   return gr;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,10 +1,10 @@
 static void *nv40_instmem_dtor(struct nvkm_instmem *base) {
   struct nv40_instmem *imem = nv40_instmem(base);
-  nvkm_memory_del(&imem->base.ramfc);
-  nvkm_memory_del(&imem->base.ramro);
+  nvkm_memory_unref(&imem->base.ramfc);
+  nvkm_memory_unref(&imem->base.ramro);
   nvkm_ramht_del(&imem->base.ramht);
-  nvkm_memory_del(&imem->base.vbios);
+  nvkm_memory_unref(&imem->base.vbios);
   nvkm_mm_fini(&imem->heap);
   if (imem->iomem) iounmap(imem->iomem);
   return imem;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,14 +1,14 @@
 void *nv50_bar_dtor(struct nvkm_bar *base) {
   struct nv50_bar *bar = nv50_bar(base);
   nvkm_gpuobj_del(&bar->bar1);
   nvkm_vm_ref(NULL, &bar->bar1_vm, bar->pgd);
   nvkm_gpuobj_del(&bar->bar2);
   if (bar->bar2_vm) {
-    nvkm_memory_del(&bar->bar2_vm->pgt[0].mem[0]);
+    nvkm_memory_unref(&bar->bar2_vm->pgt[0].mem[0]);
     nvkm_vm_ref(NULL, &bar->bar2_vm, bar->pgd);
   }
   nvkm_gpuobj_del(&bar->pgd);
   nvkm_gpuobj_del(&bar->pad);
   nvkm_gpuobj_del(&bar->mem);
   return bar;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,9 +1,9 @@
 static int nvkm_xtensa_fini(struct nvkm_engine *engine, bool suspend) {
   struct nvkm_xtensa *xtensa = nvkm_xtensa(engine);
   struct nvkm_device *device = xtensa->engine.subdev.device;
   const u32 base = xtensa->addr;
   nvkm_wr32(device, base + 0xd84, 0); /* INTR_EN */
   nvkm_wr32(device, base + 0xd94, 0); /* FIFO_CTRL */
-  if (!suspend) nvkm_memory_del(&xtensa->gpu_fw);
+  if (!suspend) nvkm_memory_unref(&xtensa->gpu_fw);
   return 0;
 }<sep>@@
expression e1;
@@
-               nvkm_memory_del
+               nvkm_memory_unref
		(e1)
--- initial
+++ final
@@ -1,9 +1,9 @@
 static void ceph_release_pages(struct page **pages, int num) {
   struct pagevec pvec;
   int i;
-  pagevec_init(&pvec, 0);
+  pagevec_init(&pvec);
   for (i = 0; i < num; i++) {
     if (pagevec_add(&pvec, pages[i]) == 0) pagevec_release(&pvec);
   }
   pagevec_release(&pvec);
 }<sep>@@
expression x,e;
@@
-       pagevec_init(x, e);
+       pagevec_init(x);