diff options
author | Kunwu Chan <chentao@kylinos.cn> | 2024-02-21 10:59:05 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-02-22 16:28:19 +0100 |
commit | 3d14cb026323f47dded416178c1cfa6125eae7d4 (patch) | |
tree | b3a5b8415d9080350bd12e314b573ad43e082cae | |
parent | drm/amdgpu/soc21: Added Video Capabilities for VCN 406 (diff) | |
download | linux-3d14cb026323f47dded416178c1cfa6125eae7d4.tar.xz linux-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 <christian.koenig@amd.com>
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 4 |
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; |