[<prev] [next>] [day] [month] [year] [list]
Message-ID: <aEkYwwhFQqPxyyey@pc>
Date: Wed, 11 Jun 2025 06:48:51 +0100
From: Salah Triki <salah.triki@...il.com>
To: Lucas De Marchi <lucas.demarchi@...el.com>,
Thomas Hellström <thomas.hellstrom@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
intel-xe@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Cc: salah.triki@...il.com
Subject: [PATCH] drm/xe: replace kmem_cache_create() with KMEM_CACHE()
Use KMEM_CACHE() instead of kmem_cache_create() to simplify the creation
of SLAB cache.
Signed-off-by: Salah Triki <salah.triki@...il.com>
---
drivers/gpu/drm/xe/xe_hw_fence.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_hw_fence.c b/drivers/gpu/drm/xe/xe_hw_fence.c
index 0b4f12be3692..b54f758a905e 100644
--- a/drivers/gpu/drm/xe/xe_hw_fence.c
+++ b/drivers/gpu/drm/xe/xe_hw_fence.c
@@ -20,9 +20,8 @@ static struct kmem_cache *xe_hw_fence_slab;
int __init xe_hw_fence_module_init(void)
{
- xe_hw_fence_slab = kmem_cache_create("xe_hw_fence",
- sizeof(struct xe_hw_fence), 0,
- SLAB_HWCACHE_ALIGN, NULL);
+ xe_hw_fence_slab = KMEM_CACHE(xe_hw_fence, SLAB_HWCACHE_ALIGN);
+
if (!xe_hw_fence_slab)
return -ENOMEM;
--
2.43.0
Powered by blists - more mailing lists