diff options
| author | Kunwu Chan <[email protected]> | 2024-02-21 09:59:07 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-02-22 17:05:16 +0000 |
| commit | a5fc4e5014cde7b4abd5a95eb1f6ec487de42a9c (patch) | |
| tree | be3a0ec003b4725feaebb6c5496e4c64711b78f6 /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | |
| parent | drm/amdgpu/soc21: Enabling PG and CG flags for VCN 4.0.6 (diff) | |
| download | kernel-a5fc4e5014cde7b4abd5a95eb1f6ec487de42a9c.tar.gz kernel-a5fc4e5014cde7b4abd5a95eb1f6ec487de42a9c.zip | |
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 <[email protected]>
Signed-off-by: Kunwu Chan <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index 1b013a44ca99..bdf1ef825d89 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c @@ -441,9 +441,7 @@ void amdgpu_sync_free(struct amdgpu_sync *sync) */ int amdgpu_sync_init(void) { - amdgpu_sync_slab = kmem_cache_create( - "amdgpu_sync", sizeof(struct amdgpu_sync_entry), 0, - SLAB_HWCACHE_ALIGN, NULL); + amdgpu_sync_slab = KMEM_CACHE(amdgpu_sync_entry, SLAB_HWCACHE_ALIGN); if (!amdgpu_sync_slab) return -ENOMEM; |
