linux/sound/core/seq
Dmitry Antipov 126c18a4bb ALSA: seq: fix kvmalloc_array() arguments order
When compiling with gcc version 14.0.0 20231220 (experimental)
and W=1, I've noticed the following warning:

sound/core/seq/seq_memory.c: In function 'snd_seq_pool_init':
sound/core/seq/seq_memory.c:445:41: warning: 'kvmalloc_array' sizes specified with
'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
  445 |         cellptr = kvmalloc_array(sizeof(struct snd_seq_event_cell), pool->size,
      |                                         ^~~~~~

Since 'n' and 'size' arguments of 'kvmalloc_array()' are multiplied
to calculate the final size, their actual order doesn't affect the
result and so this is not a bug. But it's still worth to fix it.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Link: https://lore.kernel.org/r/20231221091605.14660-1-dmantipov@yandex.ru
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-12-29 14:13:40 +01:00
..
oss
Kconfig
Makefile
seq.c
seq_clientmgr.c ALSA: seq: Create device with snd_device_alloc() 2023-08-17 09:24:28 +02:00
seq_clientmgr.h
seq_compat.c
seq_dummy.c
seq_fifo.c
seq_fifo.h
seq_info.c
seq_info.h
seq_lock.c
seq_lock.h
seq_memory.c ALSA: seq: fix kvmalloc_array() arguments order 2023-12-29 14:13:40 +01:00
seq_memory.h
seq_midi.c ALSA: seq: midi: Fix -Wformat-truncation warning 2023-09-15 13:21:30 +02:00
seq_midi_emul.c
seq_midi_event.c
seq_ports.c ALSA: seq: Fix memory leak at error path in snd_seq_create_port() 2023-07-17 08:26:15 +02:00
seq_ports.h
seq_prioq.c
seq_prioq.h
seq_queue.c
seq_queue.h
seq_system.c
seq_system.h
seq_timer.c
seq_timer.h
seq_ump_client.c ALSA: seq: ump: Fix -Wformat-truncation warning 2023-09-15 13:21:29 +02:00
seq_ump_convert.c ALSA: seq: Avoid delivery of events for disabled UMP groups 2023-09-12 10:52:28 +02:00
seq_ump_convert.h
seq_virmidi.c