From: Kunwu Chan Date: Wed, 21 Feb 2024 09:59:06 +0000 (+0800) Subject: drm/amdgpu: Simplify the allocation of mux_chunk slab caches X-Git-Tag: v6.9-rc1~126^2~5^2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e4e4618bc10be77979d61a99eb43e702fdb850bc;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Kunwu Chan Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c index e1ee1c7117fb9..d234b7ccfaafc 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;