Remove array_size() calls and replace vmalloc() with vmalloc_array() in
cs46xx_dsp_spos_create() to simplify the code and maintain consistency
with existing kmalloc_array() usage.
Signed-off-by: Qianfeng Rong <rongqianfeng@xxxxxxxx>
---
sound/pci/cs46xx/dsp_spos.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c
index e07f85322f1c..0aa68f9dd2aa 100644
--- a/sound/pci/cs46xx/dsp_spos.c
+++ b/sound/pci/cs46xx/dsp_spos.c
@@ -228,8 +228,8 @@ struct dsp_spos_instance *cs46xx_dsp_spos_create (struct snd_cs46xx * chip)
/* better to use vmalloc for this big table */
ins->symbol_table.symbols =
- vmalloc(array_size(DSP_MAX_SYMBOLS,
- sizeof(struct dsp_symbol_entry)));
+ vmalloc_array(DSP_MAX_SYMBOLS,
+ sizeof(struct dsp_symbol_entry));
ins->code.data = kmalloc(DSP_CODE_BYTE_SIZE, GFP_KERNEL);
ins->modules = kmalloc_array(DSP_MAX_MODULES,
sizeof(struct dsp_module_desc),
--
2.34.1
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]