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 sync 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
a5fc4e50 84eaa2c2

+1 -3
+1 -3
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
··· 441 441 */ 442 442 int amdgpu_sync_init(void) 443 443 { 444 - amdgpu_sync_slab = kmem_cache_create( 445 - "amdgpu_sync", sizeof(struct amdgpu_sync_entry), 0, 446 - SLAB_HWCACHE_ALIGN, NULL); 444 + amdgpu_sync_slab = KMEM_CACHE(amdgpu_sync_entry, SLAB_HWCACHE_ALIGN); 447 445 if (!amdgpu_sync_slab) 448 446 return -ENOMEM; 449 447