From: Mark Brown <broonie@kernel.org>
To: Peter Rosin <peda@lysator.liu.se>
Cc: alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, Peter Rosin <peda@axentia.se>
Subject: Re: [PATCH] ASoC: Augment existing card DAPM routes in snd_soc_of_parse_audio_routing
Date: Fri, 28 Nov 2014 16:03:20 +0000 [thread overview]
Message-ID: <20141128160320.GY7712@sirena.org.uk> (raw)
In-Reply-To: <1417122162-8122-1-git-send-email-peda@lysator.liu.se>
[-- Attachment #1: Type: text/plain, Size: 579 bytes --]
On Thu, Nov 27, 2014 at 10:02:42PM +0100, Peter Rosin wrote:
> - routes = devm_kzalloc(card->dev, num_routes * sizeof(*routes),
> + old_routes = card->num_dapm_routes;
> + routes = devm_kzalloc(card->dev,
> + (old_routes + num_routes) * sizeof(*routes),
> GFP_KERNEL);
> if (!routes) {
> dev_err(card->dev,
> @@ -4611,9 +4613,11 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
> return -EINVAL;
> }
>
> + memcpy(routes, card->dapm_routes, old_routes * sizeof(*routes));
> +
Aren't we open coding krealloc() here?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-11-28 16:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-27 21:02 [PATCH] ASoC: Augment existing card DAPM routes in snd_soc_of_parse_audio_routing Peter Rosin
2014-11-28 16:03 ` Mark Brown [this message]
2014-11-28 16:11 ` Peter Rosin
2014-12-04 22:40 ` Mark Brown
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=20141128160320.GY7712@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=peda@lysator.liu.se \
/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