[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1b7c6490c56549978740f5d27bb9d392@BY2PR03MB505.namprd03.prod.outlook.com>
Date: Mon, 20 Jan 2014 03:18:44 +0000
From: "Li.Xiubo@...escale.com" <Li.Xiubo@...escale.com>
To: Mark Brown <broonie@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>
CC: "lgirdwood@...il.com" <lgirdwood@...il.com>,
"perex@...ex.cz" <perex@...ex.cz>, "tiwai@...e.de" <tiwai@...e.de>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [alsa-devel] [PATCH] ASoC: core: Use devm_kzalloc() instead
kzalloc()
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_dmaengine_pcm_unregister() is called. This goes against the
> > principle of least surprise.
>
> Yes, I tend to agree - unless we only support managed registration the
> API shouldn't do managed things internally.
Got it.
Thanks,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists