Commit 3d14cb02 authored by Kunwu Chan's avatar Kunwu Chan Committed by Alex Deucher
Browse files

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: 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 437591d2
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -61,9 +61,7 @@ static struct kmem_cache *amdgpu_fence_slab;

int amdgpu_fence_slab_init(void)
{
	amdgpu_fence_slab = kmem_cache_create(
		"amdgpu_fence", sizeof(struct amdgpu_fence), 0,
		SLAB_HWCACHE_ALIGN, NULL);
	amdgpu_fence_slab = KMEM_CACHE(amdgpu_fence, SLAB_HWCACHE_ALIGN);
	if (!amdgpu_fence_slab)
		return -ENOMEM;
	return 0;