Re: [PATCH 1/4] ASoC: soc-dapm.c: don't use kzalloc() for param on snd_soc_dai_link_event_pre_pmu()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mark

> > Current snd_soc_dai_link_event_pre_pmu() is using kzalloc() / kfree()
> > for "params", but it is fixed size, and not used on private data.
> > It is used for setup rtd at end of this function, just a local variable.
> > We don't need to use kzalloc() / kfree() for it.
> > This patch replace it as local variable.
> 
> The reason we're allocating it dynamically is that it's quite large (608
> bytes on arm64) and is starting to get a bit excessive for allocation on
> the stack, especially when you're building with some of the KASAN type
> stuff that increases stack usage.

Oh, I see.
Thank you for clearing the reason.
I think it is very nice to have such comment on the code.

Thank you for your help !!

Best regards
---
Kuninori Morimoto



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux