[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250902072759.2386131-1-xialonglong@kylinos.cn>
Date: Tue, 2 Sep 2025 15:27:59 +0800
From: Longlong Xia <xialonglong@...inos.cn>
To: alexander.deucher@....com,
christian.koenig@....com
Cc: amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
Longlong Xia <xialonglong@...inos.cn>
Subject: [PATCH 1/1] drm/amdgpu: use KMEM_CACHE instead of kmem_cache_create
Use KMEM_CACHE() instead of kmem_cache_create() to simplify the code.
Signed-off-by: Longlong Xia <xialonglong@...inos.cn>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
index c2a983ff23c9..51f51064685f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq_fence.c
@@ -37,11 +37,7 @@ static struct kmem_cache *amdgpu_userq_fence_slab;
int amdgpu_userq_fence_slab_init(void)
{
- amdgpu_userq_fence_slab = kmem_cache_create("amdgpu_userq_fence",
- sizeof(struct amdgpu_userq_fence),
- 0,
- SLAB_HWCACHE_ALIGN,
- NULL);
+ amdgpu_userq_fence_slab = KMEM_CACHE(amdgpu_userq_fence, SLAB_HWCACHE_ALIGN);
if (!amdgpu_userq_fence_slab)
return -ENOMEM;
--
2.43.0
Powered by blists - more mailing lists