[PATCH 0/2] drm: Use vmalloc_array and vcalloc to simplify code

From: Qianfeng Rong
Date: Sat Aug 16 2025 - 10:38:26 EST


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@xxxxxxxx/

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