Commit 49c98585 authored by Kunwu Chan's avatar Kunwu Chan Committed by Daniel Vetter

drm/scheduler: Simplify the allocation of slab caches in drm_sched_fence_slab_init

Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.
Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20240221085558.166774-1-chentao@kylinos.cn
parent 048a36d8
...@@ -33,9 +33,7 @@ static struct kmem_cache *sched_fence_slab; ...@@ -33,9 +33,7 @@ static struct kmem_cache *sched_fence_slab;
static int __init drm_sched_fence_slab_init(void) static int __init drm_sched_fence_slab_init(void)
{ {
sched_fence_slab = kmem_cache_create( sched_fence_slab = KMEM_CACHE(drm_sched_fence, SLAB_HWCACHE_ALIGN);
"drm_sched_fence", sizeof(struct drm_sched_fence), 0,
SLAB_HWCACHE_ALIGN, NULL);
if (!sched_fence_slab) if (!sched_fence_slab)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment