]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Use bitmap_zalloc() when applicable
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 23 Nov 2021 20:46:44 +0000 (21:46 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Dec 2021 21:02:27 +0000 (16:02 -0500)
commitc870cc6f3d257ab2a3c57ed1c72af00edde9fac2
tree2dfbe293cdd6d686aaeaec4af514f7c358afd36e
parent23de7c15c17bab25f6d3d1789b4039fad8dae5aa
drm/amdkfd: Use bitmap_zalloc() when applicable

'doorbell_bitmap' and 'queue_slot_bitmap' are bitmaps. So use
'bitmap_zalloc()' to simplify code, improve the semantic and avoid some
open-coded arithmetic in allocator arguments.

Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_process.c
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c