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 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>

authored by

Kunwu Chan and committed by
Alex Deucher
3d14cb02 437591d2

+1 -3
+1 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
··· 61 61 62 62 int amdgpu_fence_slab_init(void) 63 63 { 64 - amdgpu_fence_slab = kmem_cache_create( 65 - "amdgpu_fence", sizeof(struct amdgpu_fence), 0, 66 - SLAB_HWCACHE_ALIGN, NULL); 64 + amdgpu_fence_slab = KMEM_CACHE(amdgpu_fence, SLAB_HWCACHE_ALIGN); 67 65 if (!amdgpu_fence_slab) 68 66 return -ENOMEM; 69 67 return 0;