Skip to content

Commit

Permalink
drm/scheduler: Simplify the allocation of slab caches in drm_sched_fe…
Browse files Browse the repository at this point in the history
…nce_slab_init

Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.

Signed-off-by: Kunwu Chan <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
KunWuChan authored and RadxaStephen committed Nov 24, 2024
1 parent ab79b29 commit 30edb03
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/gpu/drm/scheduler/sched_fence.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ static struct kmem_cache *sched_fence_slab;

static int __init drm_sched_fence_slab_init(void)
{
sched_fence_slab = kmem_cache_create(
"drm_sched_fence", sizeof(struct drm_sched_fence), 0,
SLAB_HWCACHE_ALIGN, NULL);
sched_fence_slab = KMEM_CACHE(drm_sched_fence, SLAB_HWCACHE_ALIGN);
if (!sched_fence_slab)
return -ENOMEM;

Expand Down

0 comments on commit 30edb03

Please sign in to comment.