[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20240514031348.15173-1-cuitao@kylinos.cn>
Date: Tue, 14 May 2024 11:13:48 +0800
From: cuitao <cuitao@...inos.cn>
To: maarten.lankhorst@...ux.intel.com,
dri-devel@...ts.freedesktop.org
Cc: mripard@...nel.org,
tzimmermann@...e.de,
airlied@...il.com,
daniel@...ll.ch,
linux-kernel@...r.kernel.org,
cuitao <cuitao@...inos.cn>
Subject: [PATCH] drm/xe: Simplify the allocation of sync slab caches
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.
Signed-off-by: cuitao <cuitao@...inos.cn>
---
drivers/gpu/drm/xe/xe_hw_fence.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_hw_fence.c b/drivers/gpu/drm/xe/xe_hw_fence.c
index a5de3e7b0bd6..0f4eee529c6a 100644
--- a/drivers/gpu/drm/xe/xe_hw_fence.c
+++ b/drivers/gpu/drm/xe/xe_hw_fence.c
@@ -20,9 +20,7 @@ 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.25.1
Powered by blists - more mailing lists