mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] ALSA: use vmalloc_array() to simplify code
@ 2025-08-24 13:55 Qianfeng Rong
  2025-08-24 13:55 ` [PATCH 1/3] ALSA: cs46xx: " Qianfeng Rong
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Qianfeng Rong @ 2025-08-24 13:55 UTC (permalink / raw)
  To: Jaroslav Kysela, Takashi Iwai, Qianfeng Rong, Philipp Stanner,
	Andy Shevchenko, Thorsten Blum, open list:SOUND, open list

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@vivo.com/ #1
Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-08-25 11:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-24 13:55 [PATCH 0/3] ALSA: use vmalloc_array() to simplify code Qianfeng Rong
2025-08-24 13:55 ` [PATCH 1/3] ALSA: cs46xx: " Qianfeng Rong
2025-08-24 13:55 ` [PATCH 2/3] ALSA: emu10k1: " Qianfeng Rong
2025-08-24 13:55 ` [PATCH 3/3] ALSA: maestro3: " Qianfeng Rong
2025-08-25 11:01 ` [PATCH 0/3] ALSA: " Andy Shevchenko
2025-08-25 11:46   ` Qianfeng Rong
2025-08-25 11:50     ` Philipp Stanner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®