Commit a5fc4e50 authored by Kunwu Chan's avatar Kunwu Chan Committed by Alex Deucher

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: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarKunwu Chan <chentao@kylinos.cn>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 84eaa2c2
...@@ -441,9 +441,7 @@ void amdgpu_sync_free(struct amdgpu_sync *sync) ...@@ -441,9 +441,7 @@ void amdgpu_sync_free(struct amdgpu_sync *sync)
*/ */
int amdgpu_sync_init(void) int amdgpu_sync_init(void)
{ {
amdgpu_sync_slab = kmem_cache_create( amdgpu_sync_slab = KMEM_CACHE(amdgpu_sync_entry, SLAB_HWCACHE_ALIGN);
"amdgpu_sync", sizeof(struct amdgpu_sync_entry), 0,
SLAB_HWCACHE_ALIGN, NULL);
if (!amdgpu_sync_slab) if (!amdgpu_sync_slab)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment