From: Lars-Peter Clausen <lars@metafoo.de>
To: Alexander Popov <a13xp0p0v88@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Vinod Koul <vinod.koul@intel.com>,
Gerhard Sittig <gsi@denx.de>,
Dan Williams <dan.j.williams@intel.com>,
Anatolij Gustschin <agust@denx.de>,
linuxppc-dev@lists.ozlabs.org,
devicetree-discuss@lists.ozlabs.org
Subject: Re: [PATCH RFC v4 2/5] dma: mpc512x: add support for peripheral transfers
Date: Fri, 06 Dec 2013 21:35:01 +0100 [thread overview]
Message-ID: <52A234F5.9030300@metafoo.de> (raw)
In-Reply-To: <CAF0T0X6XhHk5qhwk=Kzu_YvMNduZaMqNxGWRyyeNP8LWzDJziw@mail.gmail.com>
On 12/06/2013 09:27 PM, Alexander Popov wrote:
> 2013/10/6 Gerhard Sittig <gsi@denx.de>:
>> On Thu, Oct 03, 2013 at 18:06 +0400, Alexander Popov wrote:
>>> +
>>> + spin_lock_irqsave(&mchan->lock, flags);
>>> +
>>> + if (cfg->direction == DMA_DEV_TO_MEM) {
>>
>> Note that cfg->direction is of a different type than
>> DMA_DEV_TO_MEM (of different type than the 'direction' parameter
>> in the preparation routine) -- it's mere coincidence that the
>> numeric values happen to match at the moment.
>
> Gerhard, it seems to me that this code is correct.
> Cite from dmaengine.h:
>
> * struct dma_slave_config - dma slave channel runtime config
> * @direction: whether the data shall go in or out on this slave
> * channel, right now. DMA_TO_DEVICE and DMA_FROM_DEVICE are
> * legal values, DMA_BIDIRECTIONAL is not acceptable since we
> * need to differentiate source and target addresses.
> ...
> struct dma_slave_config {
> enum dma_transfer_direction direction;
> ...
> };
>
> The comment above the definition is obsolete, isn't it?
Yes, the comment seems to be out of date. Care to send a patch fixing it?
- Lars
next prev parent reply other threads:[~2013-12-06 20:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-03 14:06 [PATCH RFC v4 2/5] dma: mpc512x: add support for peripheral transfers Alexander Popov
2013-10-06 11:10 ` Gerhard Sittig
2013-12-06 20:27 ` Alexander Popov
2013-12-06 20:35 ` Lars-Peter Clausen [this message]
2013-12-06 20:41 ` Alexander Popov
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=52A234F5.9030300@metafoo.de \
--to=lars@metafoo.de \
--cc=a13xp0p0v88@gmail.com \
--cc=agust@denx.de \
--cc=arnd@arndb.de \
--cc=dan.j.williams@intel.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=gsi@denx.de \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=vinod.koul@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;
as well as URLs for NNTP newsgroup(s).