Home
last modified time | relevance | path

Searched refs:idr_replace (Results 1 – 25 of 30) sorted by relevance

12

/linux-6.6.21/tools/testing/radix-tree/
Didr-test.c65 idr_replace(&idr, &idr, 10); in idr_replace_test()
97 assert(idr_replace(&idr, DUMMY_PTR, 3) == NULL); in idr_null_test()
98 assert(idr_replace(&idr, DUMMY_PTR, 4) == NULL); in idr_null_test()
99 assert(idr_replace(&idr, NULL, 4) == DUMMY_PTR); in idr_null_test()
100 assert(idr_replace(&idr, DUMMY_PTR, 11) == ERR_PTR(-ENOENT)); in idr_null_test()
115 assert(idr_replace(&idr, DUMMY_PTR, 3) == ERR_PTR(-ENOENT)); in idr_null_test()
116 assert(idr_replace(&idr, DUMMY_PTR, 0) == NULL); in idr_null_test()
117 assert(idr_replace(&idr, NULL, 0) == DUMMY_PTR); in idr_null_test()
265 idr_replace(idr, &name[i], 0); in idr_align_test()
276 idr_replace(idr, &name[i + 1], 0); in idr_align_test()
/linux-6.6.21/Documentation/translations/zh_CN/core-api/
Didr.rst42 如果需要更改与一个ID相关联的指针,可以调用idr_replace()。这样做的一个常见原因是通
/linux-6.6.21/drivers/net/ethernet/mellanox/mlxsw/
Dspectrum_pgt.c133 ret = idr_replace(&pgt->pgt_idr, pgt_entry, mid); in mlxsw_sp_pgt_entry_create()
154 pgt_entry = idr_replace(&pgt->pgt_idr, NULL, pgt_entry->index); in mlxsw_sp_pgt_entry_destroy()
/linux-6.6.21/lib/
Didr.c290 void *idr_replace(struct idr *idr, void *ptr, unsigned long id) in idr_replace() function
306 EXPORT_SYMBOL(idr_replace);
/linux-6.6.21/drivers/char/tpm/
Dtpm-chip.c434 idr_replace(&dev_nums_idr, chip, chip->dev_num); in tpm_add_char_device()
450 idr_replace(&dev_nums_idr, NULL, chip->dev_num); in tpm_del_char_device()
/linux-6.6.21/drivers/tee/
Dtee_shm.c162 ret = idr_replace(&teedev->idr, shm, id); in tee_shm_alloc_user_buf()
331 ret = idr_replace(&teedev->idr, shm, id); in tee_shm_register_user_buf()
/linux-6.6.21/drivers/gpu/drm/vgem/
Dvgem_fence.c218 fence = idr_replace(&vfile->fence_idr, NULL, arg->fence); in vgem_fence_signal_ioctl()
/linux-6.6.21/include/linux/
Didr.h124 void *idr_replace(struct idr *, void *, unsigned long id);
/linux-6.6.21/drivers/accel/
Ddrm_accel.c175 idr_replace(&accel_minors_idr, minor, index); in accel_minor_replace()
/linux-6.6.21/drivers/gpu/drm/
Ddrm_drv.c194 idr_replace(&drm_minors_idr, minor, minor->index); in drm_minor_register()
220 idr_replace(&drm_minors_idr, NULL, minor->index); in drm_minor_unregister()
Ddrm_context.c246 if (IS_ERR(idr_replace(&dev->ctx_idr, map, request->ctx_id))) in drm_legacy_setsareactx()
Ddrm_auth.c126 idr_replace(&file_priv->master->magic_map, NULL, auth->magic); in drm_authmagic()
Ddrm_mode_object.c89 idr_replace(&dev->mode_config.object_idr, obj, obj->id); in drm_mode_object_register()
Ddrm_gem.c284 obj = idr_replace(&filp->object_idr, NULL, handle); in drm_gem_handle_delete()
/linux-6.6.21/drivers/gpu/drm/qxl/
Dqxl_cmd.c501 idr_replace(&qdev->surf_id_idr, surf, surf->surface_id); in qxl_hw_surface_alloc()
526 idr_replace(&qdev->surf_id_idr, NULL, surf->surface_id); in qxl_hw_surface_dealloc()
/linux-6.6.21/Documentation/core-api/
Didr.rst35 idr_replace(). One common reason to do this is to reserve an
/linux-6.6.21/drivers/gpu/drm/amd/amdgpu/
Damdgpu_bo_list.c281 old = idr_replace(&fpriv->bo_list_handles, list, handle); in amdgpu_bo_list_ioctl()
/linux-6.6.21/net/sched/
Dcls_basic.c232 idr_replace(&head->handle_idr, fnew, fnew->handle); in basic_change()
Dact_api.c851 idr_replace(&idrinfo->action_idr, in tcf_idr_check_alloc()
860 idr_replace(&idrinfo->action_idr, ERR_PTR(-EBUSY), in tcf_idr_check_alloc()
1292 idr_replace(&idrinfo->action_idr, a, a->tcfa_index); in tcf_idr_insert_many()
Dcls_bpf.c513 idr_replace(&head->handle_idr, prog, handle); in cls_bpf_change()
/linux-6.6.21/fs/nfs/
Dnfs4client.c507 idr_replace(&nn->cb_ident_idr, keep, drop->cl_cb_ident); in nfs4_swap_callback_idents()
510 idr_replace(&nn->cb_ident_idr, drop, save); in nfs4_swap_callback_idents()
/linux-6.6.21/kernel/
Dpid.c277 idr_replace(&upid->ns->idr, pid, upid->nr); in alloc_pid()
/linux-6.6.21/ipc/
Dutil.c251 idr_replace(&ids->ipcs_idr, new, idx); in ipc_idr_alloc()
/linux-6.6.21/drivers/md/
Ddm.c2126 old_md = idr_replace(&_minor_idr, md, minor); in alloc_dev()
2456 idr_replace(&_minor_idr, MINOR_ALLOCED, MINOR(disk_devt(dm_disk(md)))); in __dm_destroy()
/linux-6.6.21/net/l2tp/
Dl2tp_core.c1512 idr_replace(&pn->l2tp_tunnel_idr, tunnel, tunnel->tunnel_id); in l2tp_tunnel_register()

12