[PATCH 0/2] drm: Use vmalloc_array and vcalloc to simplify code
Qianfeng Rong
rongqianfeng at vivo.com
Sat Aug 16 14:37:49 UTC 2025
Remove array_size() calls and replace vmalloc() and vzalloc() with
vmalloc_array() and vcalloc() respectively to simplify the code.
vmalloc_array() is also optimized better, resulting in less instructions
being used [1].
[1]: https://lore.kernel.org/lkml/abc66ec5-85a4-47e1-9759-2f60ab111971@vivo.com/
Qianfeng Rong (2):
drm/nouveau: Use vmalloc_array to simplify code
drm/radeon: Use vmalloc_array and vcalloc to simplify code
drivers/gpu/drm/nouveau/nv84_fence.c | 2 +-
drivers/gpu/drm/radeon/radeon_gart.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
--
2.34.1
More information about the amd-gfx
mailing list