diff options
author | Kunwu Chan <chentao@kylinos.cn> | 2024-02-21 17:59:06 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-02-22 10:28:24 -0500 |
commit | e4e4618bc10be77979d61a99eb43e702fdb850bc (patch) | |
tree | 9081db512d1972f638558c8b367d3deb68ce3b82 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | |
parent | 3d14cb026323f47dded416178c1cfa6125eae7d4 (diff) |
drm/amdgpu: Simplify the allocation of mux_chunk 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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c index e1ee1c7117fb..d234b7ccfaaf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c @@ -159,9 +159,7 @@ int amdgpu_ring_mux_init(struct amdgpu_ring_mux *mux, struct amdgpu_ring *ring, mux->ring_entry_size = entry_size; mux->s_resubmit = false; - amdgpu_mux_chunk_slab = kmem_cache_create("amdgpu_mux_chunk", - sizeof(struct amdgpu_mux_chunk), 0, - SLAB_HWCACHE_ALIGN, NULL); + amdgpu_mux_chunk_slab = KMEM_CACHE(amdgpu_mux_chunk, SLAB_HWCACHE_ALIGN); if (!amdgpu_mux_chunk_slab) { DRM_ERROR("create amdgpu_mux_chunk cache failed\n"); return -ENOMEM; |