From: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <dan.j.williams@intel.com>,
linux-kernel@vger.kernel.org, qi.wang@intel.com,
yong.y.wang@intel.com, joel.clark@intel.com,
kok.howg.ewe@intel.com
Subject: Re: [PATCH] pch_dma: Fix suspend issue
Date: Fri, 07 Oct 2011 19:33:24 +0900 [thread overview]
Message-ID: <4E8ED574.8040609@dsn.lapis-semi.com> (raw)
In-Reply-To: <1317968080.1573.2266.camel@vkoul-udesk3>
(2011/10/07 15:14), Vinod Koul wrote:
> This is all is due to not saving nr_channels in probe and using that
> instead.
>
> Looking deeper, struct pch_dma defines array of length MAX_CHAN_NR for
> channels. Then why do you allocate memory in probe as
> pd = kzalloc(sizeof(struct pch_dma)+
> sizeof(struct pch_dma_chan) * nr_channels, GFP_KERNEL);
> what is the point in allocating additional memory for each channel?
>
> Given this, why should there be predefined channel array in pcm_dma?
>
> It would be great if we could fix this by dynamically allocating memory
> for channels based on nr_channels and not wasting due to a static array.
You are right.
Current pch_dma driver looks like wasting memory.
We must review pch_dma driver again.
Thanks,
--
tomoya
ROHM Co., Ltd.
next prev parent reply other threads:[~2011-10-07 10:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-04 7:27 Tomoya MORINAGA
2011-10-07 5:00 ` Vinod Koul
2011-10-07 5:54 ` Tomoya MORINAGA
2011-10-07 6:14 ` Vinod Koul
2011-10-07 10:33 ` Tomoya MORINAGA [this message]
2011-10-07 14:18 ` Vinod Koul
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=4E8ED574.8040609@dsn.lapis-semi.com \
--to=tomoya-linux@dsn.lapis-semi.com \
--cc=dan.j.williams@intel.com \
--cc=joel.clark@intel.com \
--cc=kok.howg.ewe@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=qi.wang@intel.com \
--cc=vinod.koul@intel.com \
--cc=yong.y.wang@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
all inboxes | Powered by JetHome®