Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Kunwu Chan and committed by
Alex Deucher
e4e4618b 3d14cb02

+1 -3
+1 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_ring_mux.c
··· 159 159 mux->ring_entry_size = entry_size; 160 160 mux->s_resubmit = false; 161 161 162 - amdgpu_mux_chunk_slab = kmem_cache_create("amdgpu_mux_chunk", 163 - sizeof(struct amdgpu_mux_chunk), 0, 164 - SLAB_HWCACHE_ALIGN, NULL); 162 + amdgpu_mux_chunk_slab = KMEM_CACHE(amdgpu_mux_chunk, SLAB_HWCACHE_ALIGN); 165 163 if (!amdgpu_mux_chunk_slab) { 166 164 DRM_ERROR("create amdgpu_mux_chunk cache failed\n"); 167 165 return -ENOMEM;