]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: seq: Use flexible array for MIDI channels
authorRosen Penev <rosenp@gmail.com>
Mon, 11 May 2026 07:54:47 +0000 (00:54 -0700)
committerTakashi Iwai <tiwai@suse.de>
Fri, 15 May 2026 06:52:44 +0000 (08:52 +0200)
commitcb02416507bc0c31415f1527aefc280ae96260bd
treec78647bce2acaa3c77fb98c7cb4c6beb469a3649
parent0d552587a3c0cd247817417d63e9a1a072fb2116
ALSA: seq: Use flexible array for MIDI channels

Store MIDI channel entries in the MIDI channel set allocation instead
of allocating them separately.

This ties the channel array lifetime directly to the channel set, removes
a separate allocation failure path, and lets __counted_by() describe the
array bounds. Move the embedded emux channel set to the end of its
containing structure so it can carry the flexible array.

Assisted-by: Codex:GPT-5.5
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260511075447.445350-1-rosenp@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/emux_synth.h
include/sound/seq_midi_emul.h
sound/core/seq/seq_midi_emul.c
sound/synth/emux/emux_seq.c