RE: [alsa-devel] [PATCH] ASoC: core: Use devm_kzalloc() instead kzalloc()

2014-01-19 Thread li.xi...@freescale.com
Hi Mar, Lars > > I don't like this. I don't think it is a good design pattern to call > > devm function from within (especial non-devm) library functions. It > > creates an asymmetric API. The memory is allocated when > > snd_dmaengine_pcm_register() is called, but it is not freed when > > snd_dm

Re: [alsa-devel] [PATCH] ASoC: core: Use devm_kzalloc() instead kzalloc()

2014-01-17 Thread Mark Brown
On Thu, Jan 16, 2014 at 10:52:35PM +0100, Lars-Peter Clausen wrote: > On 01/16/2014 09:44 AM, Xiubo Li wrote: > >Makes the code slightly shorter > >Signed-off-by: Xiubo Li > I don't like this. I don't think it is a good design pattern to call > devm function from within (especial non-devm) libra

Re: [alsa-devel] [PATCH] ASoC: core: Use devm_kzalloc() instead kzalloc()

2014-01-16 Thread Lars-Peter Clausen
On 01/16/2014 09:44 AM, Xiubo Li wrote: Makes the code slightly shorter Signed-off-by: Xiubo Li I don't like this. I don't think it is a good design pattern to call devm function from within (especial non-devm) library functions. It creates an asymmetric API. The memory is allocated when sn

[PATCH] ASoC: core: Use devm_kzalloc() instead kzalloc()

2014-01-16 Thread Xiubo Li
Makes the code slightly shorter Signed-off-by: Xiubo Li --- sound/soc/soc-generic-dmaengine-pcm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c index 5bace12..bfb012f 100644 --- a/sound/soc/so