[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZrYpcjC_vf7ldnie@smile.fi.intel.com>
Date: Fri, 9 Aug 2024 17:36:34 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: "Ding, Shenghao" <shenghao-ding@...com>
Cc: "broonie@...nel.org" <broonie@...nel.org>,
"lgirdwood@...il.com" <lgirdwood@...il.com>,
"perex@...ex.cz" <perex@...ex.cz>,
"pierre-louis.bossart@...ux.intel.com" <pierre-louis.bossart@...ux.intel.com>,
"13916275206@....com" <13916275206@....com>,
"judyhsiao@...gle.com" <judyhsiao@...gle.com>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"Salazar, Ivan" <i-salazar@...com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Chadha, Jasjot Singh" <j-chadha@...com>,
"liam.r.girdwood@...el.com" <liam.r.girdwood@...el.com>,
"bard.liao@...el.com" <bard.liao@...el.com>,
"yung-chuan.liao@...ux.intel.com" <yung-chuan.liao@...ux.intel.com>,
"Rao, Dipa" <dipa@...com>,
"yuhsuan@...gle.com" <yuhsuan@...gle.com>,
"tiwai@...e.de" <tiwai@...e.de>, "Xu, Baojun" <baojun.xu@...com>,
"soyer@....hu" <soyer@....hu>,
"Baojun.Xu@....com" <Baojun.Xu@....com>,
"Navada Kanyana, Mukund" <navada@...com>,
"cujomalainey@...gle.com" <cujomalainey@...gle.com>,
"Kutty, Aanya" <aanya@...com>,
"Mahmud, Nayeem" <nayeem.mahmud@...com>
Subject: Re: [EXTERNAL] Re: [PATCH v1] ASoc: tas2781: Add Calibration
Kcontrols and tas2563 digtial gain for Chromebook
On Mon, Jun 24, 2024 at 11:42:11AM +0000, Ding, Shenghao wrote:
> > From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> > Sent: Wednesday, May 22, 2024 8:02 PM
> > To: Ding, Shenghao <shenghao-ding@...com>
> > On Wed, May 22, 2024 at 07: 29: 41PM +0800, Shenghao Ding wrote: >
(some comments were not answered, are you agree on all of the points?)
...
> > > + cali_data->data = devm_kzalloc(tas_priv->dev, tas_priv->ndev *
> > > + (cali_data->reg_array_sz * 4 + 1), GFP_KERNEL);
> >
> > No way. First of all, we have kcalloc(), second, there is an overflow.h that has
> > necessary macros to calculate sizes for memory allocations.
> Memory allocated with devm_kzalloc is automatically freed on driver detach while kcalloc can’t
Yes, we have devm variant for kcalloc(), why can it be not utilised?
> > > + if (!cali_data->data)
> > > + return -ENOMEM;
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists