]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: Use bitmap_zalloc() when applicable
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 28 Nov 2021 16:45:55 +0000 (17:45 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 Apr 2022 21:44:23 +0000 (17:44 -0400)
commit4af532a2a76724b51968dba31f4b6441d2b52f9f
treef2ece320903c20e8035eb29afa60aa0d25168573
parent8f4153d8898aa857845671a9f69cdef98ee04ff3
drm/amdkfd: Use bitmap_zalloc() when applicable

'kfd->gtt_sa_bitmap' is a bitmap. 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.

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