aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
diff options
context:
space:
mode:
authorKunwu Chan <[email protected]>2024-02-21 09:59:05 +0000
committerAlex Deucher <[email protected]>2024-02-22 15:28:19 +0000
commit3d14cb026323f47dded416178c1cfa6125eae7d4 (patch)
treeb3a5b8415d9080350bd12e314b573ad43e082cae /drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
parentdrm/amdgpu/soc21: Added Video Capabilities for VCN 406 (diff)
downloadkernel-3d14cb026323f47dded416178c1cfa6125eae7d4.tar.gz
kernel-3d14cb026323f47dded416178c1cfa6125eae7d4.zip
drm/amdgpu: Simplify the allocation of fence slab caches
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Reviewed-by: Christian König <[email protected]> Signed-off-by: Kunwu Chan <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 70bff8cecfda..10832b470448 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -61,9 +61,7 @@ static struct kmem_cache *amdgpu_fence_slab;
int amdgpu_fence_slab_init(void)
{
- amdgpu_fence_slab = kmem_cache_create(
- "amdgpu_fence", sizeof(struct amdgpu_fence), 0,
- SLAB_HWCACHE_ALIGN, NULL);
+ amdgpu_fence_slab = KMEM_CACHE(amdgpu_fence, SLAB_HWCACHE_ALIGN);
if (!amdgpu_fence_slab)
return -ENOMEM;
return 0;