diff options
author | Kunwu Chan <chentao@kylinos.cn> | 2024-02-21 09:55:58 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2024-02-28 15:55:13 +0100 |
commit | 49c985856d8c459fb57bddcb34b428bee151d250 (patch) | |
tree | e0cd9fd58d0d32c5047b0265137c5584905a6243 | |
parent | drm: Check polling initialized before enabling in drm_helper_probe_single_con... (diff) | |
download | linux-49c985856d8c459fb57bddcb34b428bee151d250.tar.xz linux-49c985856d8c459fb57bddcb34b428bee151d250.zip |
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: Kunwu Chan <chentao@kylinos.cn>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20240221085558.166774-1-chentao@kylinos.cn
-rw-r--r-- | drivers/gpu/drm/scheduler/sched_fence.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_fence.c b/drivers/gpu/drm/scheduler/sched_fence.c index 06cedfe4b486..0f35f009b9d3 100644 --- a/drivers/gpu/drm/scheduler/sched_fence.c +++ b/drivers/gpu/drm/scheduler/sched_fence.c @@ -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; |