From: r80115 <alan.tull@freescale.com>
To: Tabi Timur-B04825 <B04825@freescale.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"broonie@opensource.wolfsonmicro.com"
<broonie@opensource.wolfsonmicro.com>,
Tull Alan-R80115 <R80115@freescale.com>,
"lrg@slimlogic.co.uk" <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC don't clobber platform DMA driver ops
Date: Tue, 15 Nov 2011 11:22:50 -0600 [thread overview]
Message-ID: <4EC29FEA.5070605@freescale.com> (raw)
In-Reply-To: <CAOZdJXXubFXg1RTJTB2h_Q4YSPpvuGwikcT1xXsDVadEd3RZAg@mail.gmail.com>
On 11/15/2011 10:56 AM, Tabi Timur-B04825 wrote:
> Something is wrong. When I apply this patch, I get this:
>
> CC sound/soc/soc-core.o
> /home/b04825/git/linux.34/sound/soc/soc-core.c: In function
> 'soc_cleanup_card_resources':
> /home/b04825/git/linux.34/sound/soc/soc-core.c:1583:3: error:
> incompatible type for argument 1 of 'kfree'
> /home/b04825/git/linux.34/include/linux/slab.h:161:6: note: expected
> 'const void *' but argument is of type 'struct snd_pcm_ops'
>
> /* free the ops */
> for (i = 0; i< card->num_rtd; i++) {
> struct snd_soc_pcm_runtime *rtd =&card->rtd[i];
> kfree(rtd->ops);
> }
>
> rtd->ops is not a pointer, so it can't be freed. Also, this:
>
> + rtd->ops = soc_pcm_ops;
>
> is a memcpy. Why not just write to rtd->ops directly?
>
I see the problem. I implemented this under 2.6.38. rtd->ops was a
pointer under 2.6.38. This could change much then.
--
Regards,
Alan
next prev parent reply other threads:[~2011-11-15 17:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-15 15:59 [PATCH] ASoC don't clobber platform DMA driver ops Alan Tull
2011-11-15 16:56 ` Tabi Timur-B04825
2011-11-15 17:22 ` r80115 [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-11-01 21:05 Alan Tull
2011-11-02 3:40 ` Tabi Timur-B04825
2011-11-02 10:24 ` Mark Brown
2011-11-10 11:43 ` Mark Brown
2011-11-10 15:14 ` r80115
2011-11-10 15:16 ` Mark Brown
2011-11-10 15:20 ` r80115
2011-11-10 15:25 ` Mark Brown
2011-11-01 18:45 Alan Tull
[not found] ` <9E5C29D1DC97674D8FB0F7D26508F7861F05DB@039-SN1MPN1-005.039d.mgd.msft.net>
2011-11-01 18:49 ` Mark Brown
[not found] ` <9E5C29D1DC97674D8FB0F7D26508F7861F0620@039-SN1MPN1-005.039d.mgd.msft.net>
2011-11-01 19:11 ` 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=4EC29FEA.5070605@freescale.com \
--to=alan.tull@freescale.com \
--cc=B04825@freescale.com \
--cc=R80115@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@slimlogic.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.