[PATCH 0/3] ALSA: use vmalloc_array() to simplify code

From: Qianfeng Rong
Date: Sun Aug 24 2025 - 09:57:10 EST


Remove array_size() calls and replace vmalloc() with vmalloc_array() to
simplify the code and maintain consistency with existing kmalloc_array()
usage.

vmalloc_array() is also optimized better, resulting in less instructions
being used [1].

Link: https://lore.kernel.org/lkml/abc66ec5-85a4-47e1-9759-2f60ab111971@xxxxxxxx/ #1
Signed-off-by: Qianfeng Rong <rongqianfeng@xxxxxxxx>

Qianfeng Rong (3):
ALSA: cs46xx: use vmalloc_array() to simplify code
ALSA: emu10k1: use vmalloc_array() to simplify code
ALSA: maestro3: use vmalloc_array() to simplify code

sound/pci/cs46xx/dsp_spos.c | 4 ++--
sound/pci/emu10k1/emu10k1_main.c | 8 ++++----
sound/pci/emu10k1/emufx.c | 2 +-
sound/pci/emu10k1/p16v.c | 2 +-
sound/pci/maestro3.c | 5 ++---
5 files changed, 10 insertions(+), 11 deletions(-)

--
2.34.1