imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,76 +1,76 @@
 int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port, enum ib_qp_type dest_qpt, u16 pkey_index, u32 remote_qpn, u32 qkey, struct rdma_ah_attr *attr, u8 *s_mac, u16 vlan_id, struct ib_mad *mad) {
   struct ib_sge list;
   struct ib_ud_wr wr;
   struct ib_send_wr *bad_wr;
   struct mlx4_ib_demux_pv_ctx *sqp_ctx;
   struct mlx4_ib_demux_pv_qp *sqp;
   struct mlx4_mad_snd_buf *sqp_mad;
   struct ib_ah *ah;
   struct ib_qp *send_qp = NULL;
   unsigned wire_tx_ix = 0;
   int ret = 0;
   u16 wire_pkey_ix;
   int src_qpnum;
   u8 sgid_index;
   sqp_ctx = dev->sriov.sqps[port - 1];
   /* check if proxy qp created */
   if (!sqp_ctx || sqp_ctx->state != DEMUX_PV_STATE_ACTIVE) return -EAGAIN;
   if (dest_qpt == IB_QPT_SMI) {
     src_qpnum = 0;
     sqp = &sqp_ctx->qp[0];
     wire_pkey_ix = dev->pkeys.virt2phys_pkey[slave][port - 1][0];
   } else {
     src_qpnum = 1;
     sqp = &sqp_ctx->qp[1];
     wire_pkey_ix = dev->pkeys.virt2phys_pkey[slave][port - 1][pkey_index];
   }
   send_qp = sqp->qp;
   /* create ah */
   sgid_index = attr->grh.sgid_index;
   attr->grh.sgid_index = 0;
   ah = rdma_create_ah(sqp_ctx->pd, attr);
   if (IS_ERR(ah)) return -ENOMEM;
   attr->grh.sgid_index = sgid_index;
   to_mah(ah)->av.ib.gid_index = sgid_index;
   /* get rid of force-loopback bit */
   to_mah(ah)->av.ib.port_pd &= cpu_to_be32(0x7FFFFFFF);
   spin_lock(&sqp->tx_lock);
   if (sqp->tx_ix_head - sqp->tx_ix_tail >= (MLX4_NUM_TUNNEL_BUFS - 1))
     ret = -EAGAIN;
   else
     wire_tx_ix = (++sqp->tx_ix_head) & (MLX4_NUM_TUNNEL_BUFS - 1);
   spin_unlock(&sqp->tx_lock);
   if (ret) goto out;
   sqp_mad = (struct mlx4_mad_snd_buf *)(sqp->tx_ring[wire_tx_ix].buf.addr);
   if (sqp->tx_ring[wire_tx_ix].ah) ib_destroy_ah(sqp->tx_ring[wire_tx_ix].ah);
   sqp->tx_ring[wire_tx_ix].ah = ah;
   ib_dma_sync_single_for_cpu(&dev->ib_dev, sqp->tx_ring[wire_tx_ix].buf.map, sizeof(struct mlx4_mad_snd_buf), DMA_TO_DEVICE);
   memcpy(&sqp_mad->payload, mad, sizeof *mad);
   ib_dma_sync_single_for_device(&dev->ib_dev, sqp->tx_ring[wire_tx_ix].buf.map, sizeof(struct mlx4_mad_snd_buf), DMA_TO_DEVICE);
   list.addr = sqp->tx_ring[wire_tx_ix].buf.map;
   list.length = sizeof(struct mlx4_mad_snd_buf);
   list.lkey = sqp_ctx->pd->local_dma_lkey;
   wr.ah = ah;
   wr.port_num = port;
   wr.pkey_index = wire_pkey_ix;
   wr.remote_qkey = qkey;
   wr.remote_qpn = remote_qpn;
   wr.wr.next = NULL;
   wr.wr.wr_id = ((u64)wire_tx_ix) | MLX4_TUN_SET_WRID_QPN(src_qpnum);
   wr.wr.sg_list = &list;
   wr.wr.num_sge = 1;
   wr.wr.opcode = IB_WR_SEND;
   wr.wr.send_flags = IB_SEND_SIGNALED;
   if (s_mac) memcpy(to_mah(ah)->av.eth.s_mac, s_mac, 6);
   if (vlan_id < 0x1000) vlan_id |= (attr->sl & 7) << 13;
   to_mah(ah)->av.eth.vlan = cpu_to_be16(vlan_id);
   ret = ib_post_send(send_qp, &wr.wr, &bad_wr);
   if (!ret) return 0;
   spin_lock(&sqp->tx_lock);
   sqp->tx_ix_tail++;
   spin_unlock(&sqp->tx_lock);
   sqp->tx_ring[wire_tx_ix].ah = NULL;
 out:
-  ib_destroy_ah(ah);
+  rdma_destroy_ah(ah);
   return ret;
 }<sep>@@
expression ad;
@@

-       ib_destroy_ah
+       rdma_destroy_ah
	(ah)
--- initial
+++ final
@@ -1,37 +1,37 @@
 static void vema_recv(struct ib_mad_agent *mad_agent, struct ib_mad_send_buf *send_buf, struct ib_mad_recv_wc *mad_wc) {
   struct opa_vnic_vema_port *port;
   struct ib_ah *ah;
   struct ib_mad_send_buf *rsp;
   struct opa_vnic_vema_mad *vema_mad;
   if (!mad_wc || !mad_wc->recv_buf.mad) return;
   port = mad_agent->context;
   ah = ib_create_ah_from_wc(mad_agent->qp->pd, mad_wc->wc, mad_wc->recv_buf.grh, mad_agent->port_num);
   if (IS_ERR(ah)) goto free_recv_mad;
   rsp = ib_create_send_mad(mad_agent, mad_wc->wc->src_qp, mad_wc->wc->pkey_index, 0, IB_MGMT_VENDOR_HDR, OPA_VNIC_EMA_DATA, GFP_KERNEL, OPA_MGMT_BASE_VERSION);
   if (IS_ERR(rsp)) goto err_rsp;
   rsp->ah = ah;
   vema_mad = rsp->mad;
   memcpy(vema_mad, mad_wc->recv_buf.mad, IB_MGMT_VENDOR_HDR);
   vema_mad->mad_hdr.method = IB_MGMT_METHOD_GET_RESP;
   vema_mad->mad_hdr.status = 0;
   /* Lock ensures network adapter is not removed */
   mutex_lock(&port->lock);
   switch (mad_wc->recv_buf.mad->mad_hdr.method) {
   case IB_MGMT_METHOD_GET: vema_get(port, (struct opa_vnic_vema_mad *)mad_wc->recv_buf.mad, vema_mad); break;
   case IB_MGMT_METHOD_SET: vema_set(port, (struct opa_vnic_vema_mad *)mad_wc->recv_buf.mad, vema_mad); break;
   default: vema_mad->mad_hdr.status = OPA_VNIC_UNSUP_ATTR; break;
   }
   mutex_unlock(&port->lock);
   if (!ib_post_send_mad(rsp, NULL)) {
     /*
      * with post send successful ah and send mad
      * will be destroyed in send handler
      */
     goto free_recv_mad;
   }
   ib_free_send_mad(rsp);
 err_rsp:
-  ib_destroy_ah(ah);
+  rdma_destroy_ah(ah);
 free_recv_mad:
   ib_free_recv_mad(mad_wc);
 }<sep>@@
expression ad;
@@

-       ib_destroy_ah
+       rdma_destroy_ah
	(ah)
--- initial
+++ final
@@ -1,62 +1,62 @@
 ssize_t ib_uverbs_create_ah(struct ib_uverbs_file *file, struct ib_device *ib_dev, const char __user *buf, int in_len, int out_len) {
   struct ib_uverbs_create_ah cmd;
   struct ib_uverbs_create_ah_resp resp;
   struct ib_uobject *uobj;
   struct ib_pd *pd;
   struct ib_ah *ah;
   struct rdma_ah_attr attr;
   int ret;
   struct ib_udata udata;
   if (out_len < sizeof resp) return -ENOSPC;
   if (copy_from_user(&cmd, buf, sizeof cmd)) return -EFAULT;
   INIT_UDATA(&udata, buf + sizeof(cmd), (unsigned long)cmd.response + sizeof(resp), in_len - sizeof(cmd), out_len - sizeof(resp));
   uobj = uobj_alloc(uobj_get_type(ah), file->ucontext);
   if (IS_ERR(uobj)) return PTR_ERR(uobj);
   pd = uobj_get_obj_read(pd, cmd.pd_handle, file->ucontext);
   if (!pd) {
     ret = -EINVAL;
     goto err;
   }
   attr.dlid = cmd.attr.dlid;
   attr.sl = cmd.attr.sl;
   attr.src_path_bits = cmd.attr.src_path_bits;
   attr.static_rate = cmd.attr.static_rate;
   attr.port_num = cmd.attr.port_num;
   memset(&attr.dmac, 0, sizeof(attr.dmac));
   if (cmd.attr.is_global) {
     attr.ah_flags = IB_AH_GRH;
     attr.grh.flow_label = cmd.attr.grh.flow_label;
     attr.grh.sgid_index = cmd.attr.grh.sgid_index;
     attr.grh.hop_limit = cmd.attr.grh.hop_limit;
     attr.grh.traffic_class = cmd.attr.grh.traffic_class;
     memcpy(attr.grh.dgid.raw, cmd.attr.grh.dgid, 16);
   } else {
     attr.ah_flags = 0;
   }
   ah = pd->device->create_ah(pd, &attr, &udata);
   if (IS_ERR(ah)) {
     ret = PTR_ERR(ah);
     goto err_put;
   }
   ah->device = pd->device;
   ah->pd = pd;
   atomic_inc(&pd->usecnt);
   ah->uobject = uobj;
   uobj->user_handle = cmd.user_handle;
   uobj->object = ah;
   resp.ah_handle = uobj->id;
   if (copy_to_user((void __user *)(unsigned long)cmd.response, &resp, sizeof resp)) {
     ret = -EFAULT;
     goto err_copy;
   }
   uobj_put_obj_read(pd);
   uobj_alloc_commit(uobj);
   return in_len;
 err_copy:
-  ib_destroy_ah(ah);
+  rdma_destroy_ah(ah);
 err_put:
   uobj_put_obj_read(pd);
 err:
   uobj_alloc_abort(uobj);
   return ret;
 }<sep>@@
expression ad;
@@

-       ib_destroy_ah
+       rdma_destroy_ah
	(ah)
--- initial
+++ final
@@ -1,34 +1,34 @@
 int atomisp_acc_map(struct atomisp_sub_device *asd, struct atomisp_acc_map *map) {
   struct atomisp_map *atomisp_map;
   ia_css_ptr cssptr;
   int pgnr;
   if (map->css_ptr) return -EINVAL;
   if (asd->acc.pipeline) return -EBUSY;
   if (map->user_ptr) {
     /* Buffer to map must be page-aligned */
     if ((unsigned long)map->user_ptr & ~PAGE_MASK) {
       dev_err(asd->isp->dev, "%s: mapped buffer address %p is not page aligned\n", __func__, map->user_ptr);
       return -EINVAL;
     }
     pgnr = DIV_ROUND_UP(map->length, PAGE_SIZE);
     cssptr = hrt_isp_css_mm_alloc_user_ptr(map->length, map->user_ptr, pgnr, HRT_USR_PTR, (map->flags & ATOMISP_MAP_FLAG_CACHED));
   } else {
     /* Allocate private buffer. */
     if (map->flags & ATOMISP_MAP_FLAG_CACHED)
       cssptr = hrt_isp_css_mm_calloc_cached(map->length);
     else
       cssptr = hrt_isp_css_mm_calloc(map->length);
   }
   if (!cssptr) return -ENOMEM;
   atomisp_map = kmalloc(sizeof(*atomisp_map), GFP_KERNEL);
   if (!atomisp_map) {
-    mmgr_free(cssptr);
+    hmm_free(cssptr);
     return -ENOMEM;
   }
   atomisp_map->ptr = cssptr;
   atomisp_map->length = map->length;
   list_add(&atomisp_map->list, &asd->acc.memory_maps);
   dev_dbg(asd->isp->dev, "%s: userptr %p, css_address 0x%x, size %d\n", __func__, map->user_ptr, cssptr, map->length);
   map->css_ptr = cssptr;
   return 0;
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,18 +1,18 @@
 void atomisp_acc_release(struct atomisp_sub_device *asd) {
   struct atomisp_acc_fw *acc_fw, *ta;
   struct atomisp_map *atomisp_map, *tm;
   /* Stop acceleration if already running */
   if (asd->acc.pipeline) acc_stop_acceleration(asd);
   /* Unload all loaded acceleration binaries */
   list_for_each_entry_safe(acc_fw, ta, &asd->acc.fw, list) {
     list_del(&acc_fw->list);
     ida_remove(&asd->acc.ida, acc_fw->handle);
     acc_free_fw(acc_fw);
   }
   /* Free all mapped memory blocks */
   list_for_each_entry_safe(atomisp_map, tm, &asd->acc.memory_maps, list) {
     list_del(&atomisp_map->list);
-    mmgr_free(atomisp_map->ptr);
+    hmm_free(atomisp_map->ptr);
     kfree(atomisp_map);
   }
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,10 +1,10 @@
 int atomisp_acc_unmap(struct atomisp_sub_device *asd, struct atomisp_acc_map *map) {
   struct atomisp_map *atomisp_map;
   if (asd->acc.pipeline) return -EBUSY;
   atomisp_map = acc_get_map(asd, map->css_ptr, map->length);
   if (!atomisp_map) return -EINVAL;
   list_del(&atomisp_map->list);
-  mmgr_free(atomisp_map->ptr);
+  hmm_free(atomisp_map->ptr);
   kfree(atomisp_map);
   return 0;
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,13 +1,13 @@
 enum ia_css_err ia_css_binary_uninit(void) {
   unsigned int i;
   struct ia_css_binary_xinfo *b;
   for (i = 0; i < IA_CSS_BINARY_NUM_MODES; i++) {
     for (b = binary_infos[i]; b; b = b->next) {
-      if (b->xmem_addr) mmgr_free(b->xmem_addr);
+      if (b->xmem_addr) hmm_free(b->xmem_addr);
       b->xmem_addr = mmgr_NULL;
     }
     binary_infos[i] = NULL;
   }
   sh_css_free(all_binaries);
   return IA_CSS_SUCCESS;
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,8 +1,8 @@
 void ia_css_frame_free(struct ia_css_frame *frame) {
   IA_CSS_ENTER_PRIVATE("frame = %p", frame);
   if (frame != NULL) {
-    mmgr_free(frame->data);
+    hmm_free(frame->data);
     sh_css_free(frame);
   }
   IA_CSS_LEAVE_PRIVATE("void");
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,6 +1,6 @@
 void ia_css_isp_dvs_statistics_free(struct ia_css_isp_dvs_statistics *me) {
   if (me != NULL) {
-    mmgr_free(me->data_ptr);
+    hmm_free(me->data_ptr);
     sh_css_free(me);
   }
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,6 +1,6 @@
 void ia_css_isp_dvs2_statistics_free(struct ia_css_isp_dvs_statistics *me) {
   if (me != NULL) {
-    mmgr_free(me->data_ptr);
+    hmm_free(me->data_ptr);
     sh_css_free(me);
   }
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,11 +1,11 @@
 void ia_css_isp_param_destroy_isp_parameters(struct ia_css_isp_param_host_segments *mem_params, struct ia_css_isp_param_css_segments *css_params) {
   unsigned mem, pclass;
   for (mem = 0; mem < IA_CSS_NUM_MEMORIES; mem++) {
     for (pclass = 0; pclass < IA_CSS_NUM_PARAM_CLASSES; pclass++) {
       if (mem_params->params[pclass][mem].address) sh_css_free(mem_params->params[pclass][mem].address);
-      if (css_params->params[pclass][mem].address) mmgr_free(css_params->params[pclass][mem].address);
+      if (css_params->params[pclass][mem].address) hmm_free(css_params->params[pclass][mem].address);
       mem_params->params[pclass][mem].address = NULL;
       css_params->params[pclass][mem].address = 0x0;
     }
   }
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,39 +1,39 @@
 void ia_css_refcount_clear(int32_t id, clear_func clear_func_ptr) {
   struct ia_css_refcount_entry *entry;
   uint32_t i;
   uint32_t count = 0;
   assert(clear_func_ptr != NULL);
   ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_refcount_clear(%x)\n", id);
   for (i = 0; i < myrefcount.size; i++) {
     /* driver verifier tool has issues with &arr[i]
        and prefers arr + i; as these are actually equivalent
        the line below uses + i
     */
     entry = myrefcount.items + i;
     if ((entry->data != mmgr_NULL) && (entry->id == id)) {
       ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE,
                           "ia_css_refcount_clear:"
                           " %x: 0x%x\n",
                           id, entry->data);
       if (clear_func_ptr) {
         /* clear using provided function */
         clear_func_ptr(entry->data);
       } else {
         ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_refcount_clear: "
                                                 "using mmgr_free: "
                                                 "no clear_func\n");
-        mmgr_free(entry->data);
+        hmm_free(entry->data);
       }
 #ifndef ISP2401
 #else
       assert(entry->count == 0);
 #endif
       if (entry->count != 0) { IA_CSS_WARNING("Ref count for entry %x is not zero!", entry->id); }
       entry->data = mmgr_NULL;
       entry->count = 0;
       entry->id = 0;
       count++;
     }
   }
   ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_refcount_clear(%x): cleared %d\n", id, count);
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,33 +1,33 @@
 bool ia_css_refcount_decrement(int32_t id, hrt_vaddress ptr) {
   struct ia_css_refcount_entry *entry;
   ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_refcount_decrement(%x) 0x%x\n", id, ptr);
   if (ptr == mmgr_NULL) return false;
   entry = refcount_find_entry(ptr, false);
   if (entry) {
     if (entry->id != id) {
       ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR, "ia_css_refcount_decrement(): Ref count IDS do not match!\n");
       return false;
     }
     if (entry->count > 0) {
       entry->count -= 1;
       if (entry->count == 0) {
         /* ia_css_debug_dtrace(IA_CSS_DBEUG_TRACE,
            "ia_css_refcount_decrement: freeing\n");*/
-        mmgr_free(ptr);
+        hmm_free(ptr);
         entry->data = mmgr_NULL;
         entry->id = 0;
       }
       return true;
     }
   }
   /* SHOULD NOT HAPPEN: ptr not managed by refcount, or not
      valid anymore */
   if (entry)
     IA_CSS_ERROR("id %x, ptr 0x%x entry %p entry->id %x entry->count %d\n", id, ptr, entry, entry->id, entry->count);
   else
     IA_CSS_ERROR("entry NULL\n");
 #ifdef ISP2401
   assert(false);
 #endif
   return false;
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,25 +1,25 @@
 void ia_css_refcount_uninit(void) {
   struct ia_css_refcount_entry *entry;
   uint32_t i;
   ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_refcount_uninit() entry\n");
   for (i = 0; i < myrefcount.size; i++) {
     /* driver verifier tool has issues with &arr[i]
        and prefers arr + i; as these are actually equivalent
        the line below uses + i
     */
     entry = myrefcount.items + i;
     if (entry->data != mmgr_NULL) {
       /*	ia_css_debug_dtrace(IA_CSS_DBG_TRACE,
               "ia_css_refcount_uninit: freeing (%x)\n",
               entry->data);*/
-      mmgr_free(entry->data);
+      hmm_free(entry->data);
       entry->data = mmgr_NULL;
       entry->count = 0;
       entry->id = 0;
     }
   }
   sh_css_free(myrefcount.items);
   myrefcount.items = NULL;
   myrefcount.size = 0;
   ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_refcount_uninit() leave\n");
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,18 +1,18 @@
 void ia_css_rmgr_rel_vbuf(struct ia_css_rmgr_vbuf_pool *pool, struct ia_css_rmgr_vbuf_handle **handle) {
   if ((pool == NULL) || (handle == NULL) || (*handle == NULL)) {
     IA_CSS_LOG("Invalid inputs");
     return;
   }
   /* release the handle */
   if ((*handle)->count == 1) {
     if (!pool->recycle) {
       /* non recycling pool, free mem */
-      mmgr_free((*handle)->vptr);
+      hmm_free((*handle)->vptr);
     } else {
       /* recycle to pool */
       rmgr_push_handle(pool, handle);
     }
   }
   ia_css_rmgr_refcount_release_vbuf(handle);
   *handle = NULL;
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,23 +1,23 @@
 void ia_css_rmgr_uninit_vbuf(struct ia_css_rmgr_vbuf_pool *pool) {
   uint32_t i;
   ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "ia_css_rmgr_uninit_vbuf()\n");
   if (pool == NULL) {
     ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR, "ia_css_rmgr_uninit_vbuf(): NULL argument\n");
     return;
   }
   if (pool->handles != NULL) {
     /* free the hmm buffers */
     for (i = 0; i < pool->size; i++) {
       if (pool->handles[i] != NULL) {
         ia_css_debug_dtrace(IA_CSS_DEBUG_TRACE, "   freeing/releasing %x (count=%d)\n", pool->handles[i]->vptr, pool->handles[i]->count);
         /* free memory */
-        mmgr_free(pool->handles[i]->vptr);
+        hmm_free(pool->handles[i]->vptr);
         /* remove from refcount admin */
         ia_css_rmgr_refcount_release_vbuf(&pool->handles[i]);
       }
     }
     /* now free the pool handles list */
     sh_css_free(pool->handles);
     pool->handles = NULL;
   }
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,18 +1,18 @@
 static void acc_unload_extension(struct ia_css_fw_info *firmware) {
   struct ia_css_fw_info *hd = firmware;
   struct ia_css_fw_info *hdn = NULL;
   if (firmware == NULL) /* should not happen */
     return;
   /* unload and remove multiple firmwares */
   while (hd) {
     hdn = (hd->next) ? &(*hd->next) : NULL;
     if (hd->info.isp.xmem_addr) {
-      mmgr_free(hd->info.isp.xmem_addr);
+      hmm_free(hd->info.isp.xmem_addr);
       hd->info.isp.xmem_addr = mmgr_NULL;
     }
     hd->isp_code = NULL;
     hd->next = NULL;
     hd = hdn;
   }
   firmware->loaded = false;
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,5 +1,5 @@
 static void free_buffer_callback(hrt_vaddress ptr) {
   IA_CSS_ENTER_PRIVATE("void");
-  mmgr_free(ptr);
+  hmm_free(ptr);
   IA_CSS_LEAVE_PRIVATE("void");
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,6 +1,6 @@
 void ia_css_isp_3a_statistics_free(struct ia_css_isp_3a_statistics *me) {
   if (me != NULL) {
-    mmgr_free(me->data_ptr);
+    hmm_free(me->data_ptr);
     sh_css_free(me);
   }
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,13 +1,13 @@
 void ia_css_metadata_free(struct ia_css_metadata *me) {
   if (me != NULL) {
     /* The enter and leave macros are placed inside
      * the condition to avoid false logging of metadata
      * free events when metadata is disabled.
      * We found this to be confusing during development
      * and debugging. */
     IA_CSS_ENTER("me=%p", me);
-    mmgr_free(me->address);
+    hmm_free(me->address);
     sh_css_free(me);
     IA_CSS_LEAVE("void");
   }
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,63 +1,63 @@
 enum ia_css_err ia_css_pipe_set_bci_scaler_lut(struct ia_css_pipe *pipe, const void *lut) {
   enum ia_css_err err = IA_CSS_SUCCESS;
 #ifndef ISP2401
   bool store = true;
 #else
   bool stream_started = false;
 #endif
   IA_CSS_ENTER("pipe=%p lut=%p", pipe, lut);
   if (lut == NULL || pipe == NULL) {
     err = IA_CSS_ERR_INVALID_ARGUMENTS;
     IA_CSS_LEAVE("err=%d", err);
     return err;
   }
   /* If the pipe belongs to a stream and the stream has started, it is not
    * safe to store lut to gdc HW. If pipe->stream is NULL, then no stream is
    * created with this pipe, so it is safe to do this operation as long as
    * ia_css_init() has been called. */
   if (pipe->stream && pipe->stream->started) {
     ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR, "unable to set scaler lut since stream has started\n");
 #ifndef ISP2401
     store = false;
 #else
     stream_started = true;
 #endif
     err = IA_CSS_ERR_NOT_SUPPORTED;
   }
   /* Free any existing tables. */
 #ifndef ISP2401
   if (pipe->scaler_pp_lut != mmgr_NULL) {
-    mmgr_free(pipe->scaler_pp_lut);
+    hmm_free(pipe->scaler_pp_lut);
     pipe->scaler_pp_lut = mmgr_NULL;
   }
 #else
   sh_css_params_free_gdc_lut(pipe->scaler_pp_lut);
   pipe->scaler_pp_lut = mmgr_NULL;
 #endif
 #ifndef ISP2401
   if (store) {
     pipe->scaler_pp_lut = mmgr_malloc(sizeof(zoom_table));
 #else
   if (!stream_started) {
     pipe->scaler_pp_lut = sh_css_params_alloc_gdc_lut();
 #endif
     if (pipe->scaler_pp_lut == mmgr_NULL) {
 #ifndef ISP2401
       IA_CSS_LEAVE("lut(%p) err=%d", pipe->scaler_pp_lut, err);
       return IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
 #else
       ia_css_debug_dtrace(IA_CSS_DEBUG_ERROR, "unable to allocate scaler_pp_lut\n");
       err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
     } else {
       gdc_lut_convert_to_isp_format((const int(*)[HRT_GDC_N])lut, interleaved_lut_temp);
       mmgr_store(pipe->scaler_pp_lut, (int *)interleaved_lut_temp, sizeof(zoom_table));
 #endif
     }
 #ifndef ISP2401
     gdc_lut_convert_to_isp_format((const int(*)[HRT_GDC_N])lut, interleaved_lut_temp);
     mmgr_store(pipe->scaler_pp_lut, (int *)interleaved_lut_temp, sizeof(zoom_table));
 #endif
   }
   IA_CSS_LEAVE("lut(%p) err=%d", pipe->scaler_pp_lut, err);
   return err;
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,13 +1,13 @@
 void sh_css_params_free_default_gdc_lut(void) {
   IA_CSS_ENTER_PRIVATE("void");
 #ifndef ISP2401
   if (default_gdc_lut != mmgr_NULL) {
-    mmgr_free(default_gdc_lut);
+    hmm_free(default_gdc_lut);
     default_gdc_lut = mmgr_NULL;
   }
 #else
   sh_css_params_free_gdc_lut(default_gdc_lut);
   default_gdc_lut = mmgr_NULL;
 #endif
   IA_CSS_LEAVE_PRIVATE("void");
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)
--- initial
+++ final
@@ -1,3 +1,3 @@
 inline void sh_css_params_free_gdc_lut(hrt_vaddress addr) {
-  if (addr != mmgr_NULL) mmgr_free(addr);
+  if (addr != mmgr_NULL) hmm_free(addr);
 }<sep>@@
expression e;
@@
-       mmgr_free
+       hmm_free
		(e)