From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Ding, Shenghao" <shenghao-ding@ti.com>
Cc: "broonie@kernel.org" <broonie@kernel.org>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"perex@perex.cz" <perex@perex.cz>,
"pierre-louis.bossart@linux.intel.com"
<pierre-louis.bossart@linux.intel.com>,
"13916275206@139.com" <13916275206@139.com>,
"judyhsiao@google.com" <judyhsiao@google.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"Salazar, Ivan" <i-salazar@ti.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Chadha, Jasjot Singh" <j-chadha@ti.com>,
"liam.r.girdwood@intel.com" <liam.r.girdwood@intel.com>,
"bard.liao@intel.com" <bard.liao@intel.com>,
"yung-chuan.liao@linux.intel.com"
<yung-chuan.liao@linux.intel.com>, "Rao, Dipa" <dipa@ti.com>,
"yuhsuan@google.com" <yuhsuan@google.com>,
"tiwai@suse.de" <tiwai@suse.de>, "Xu, Baojun" <baojun.xu@ti.com>,
"soyer@irl.hu" <soyer@irl.hu>,
"Baojun.Xu@fpt.com" <Baojun.Xu@fpt.com>,
"Navada Kanyana, Mukund" <navada@ti.com>,
"cujomalainey@google.com" <cujomalainey@google.com>,
"Kutty, Aanya" <aanya@ti.com>,
"Mahmud, Nayeem" <nayeem.mahmud@ti.com>
Subject: Re: [EXTERNAL] Re: [PATCH v1] ASoc: tas2781: Add Calibration Kcontrols and tas2563 digtial gain for Chromebook
Date: Fri, 9 Aug 2024 17:36:34 +0300 [thread overview]
Message-ID: <ZrYpcjC_vf7ldnie@smile.fi.intel.com> (raw)
In-Reply-To: <6b6a0af1e55241c4b2acde42e9966e3b@ti.com>
On Mon, Jun 24, 2024 at 11:42:11AM +0000, Ding, Shenghao wrote:
> > From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Sent: Wednesday, May 22, 2024 8:02 PM
> > To: Ding, Shenghao <shenghao-ding@ti.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
next prev parent reply other threads:[~2024-08-09 14:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-22 11:29 [PATCH v1] ASoc: tas2781: Add Calibration Kcontrols and tas2563 digtial gain for Chromebook Shenghao Ding
2024-05-22 12:01 ` Andy Shevchenko
2024-06-24 11:42 ` [EXTERNAL] " Ding, Shenghao
2024-08-09 14:36 ` Andy Shevchenko [this message]
2024-05-22 13:40 ` Pierre-Louis Bossart
2024-05-22 22:30 ` kernel test robot
2024-05-23 0:34 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZrYpcjC_vf7ldnie@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=13916275206@139.com \
--cc=Baojun.Xu@fpt.com \
--cc=aanya@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=baojun.xu@ti.com \
--cc=bard.liao@intel.com \
--cc=broonie@kernel.org \
--cc=cujomalainey@google.com \
--cc=dipa@ti.com \
--cc=i-salazar@ti.com \
--cc=j-chadha@ti.com \
--cc=judyhsiao@google.com \
--cc=lgirdwood@gmail.com \
--cc=liam.r.girdwood@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=navada@ti.com \
--cc=nayeem.mahmud@ti.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=shenghao-ding@ti.com \
--cc=soyer@irl.hu \
--cc=tiwai@suse.de \
--cc=yuhsuan@google.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox