Skip to contentSkip to conversation

drm/lima: Simplify the allocation of slab caches in lima_sched_slab_init

PATCH New Kunwu Chan 1 participant 1 message Feb 21, 2024

Subsystems (3)
lore
Share & tools
lore

Kunwu Chan

author
#0 lore raw

PATCH 1/1 drm/lima: Simplify the allocation of slab caches in lima_sched_slab_init

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

---
 drivers/gpu/drm/lima/lima_sched.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/lima/lima_sched.c +1 -3
index c3bf8cda8498..265ee6ca3c44 100644
@@ -27,9 +27,7 @@ static int lima_fence_slab_refcnt;
 int lima_sched_slab_init(void)
 {
 	if (!lima_fence_slab) {
-		lima_fence_slab = kmem_cache_create(
-			"lima_fence", sizeof(struct lima_fence), 0,
-			SLAB_HWCACHE_ALIGN, NULL);
+		lima_fence_slab = KMEM_CACHE(lima_fence, SLAB_HWCACHE_ALIGN);
 		if (!lima_fence_slab)
 			return -ENOMEM;
 	}
Signature · 1 line
2.39.2