From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: linux-sh@vger.kernel.org
Subject: Re: [RESEND PATCH 1/6] dma: rcar-dma: add wait after stopping dma engine
Date: Mon, 21 Sep 2015 17:39:28 +0000 [thread overview]
Message-ID: <560040D0.9050806@cogentembedded.com> (raw)
In-Reply-To: <1442776262-2503-2-git-send-email-hamzahfrq.sub@gmail.com>
Hello.
On 09/21/2015 02:30 PM, Hamza Farooq wrote:
>>> +#define NR_READS_TO_WAIT (5) /* number of times to check if DE = 0 */
>>
>> Parens not needed. (I'm seeing this patchset for the first time.)
> They prevent funny things from happening so I use them all the time.
No, they don't in this case.
> First time when I sent the patch-set, I had missed linux-sh mailing
> list.
> Here's the link from dmaengine mailing list in case you're interested
> http://www.spinics.net/lists/dmaengine/msg06103.html
Thanks for the link.
>>> +static inline int rcar_dmac_wait_stop(struct rcar_dmac_chan *chan)
>>> +{
>>> + unsigned int i = 0;
>>> +
>>> + do {
>>> + u32 chcr = rcar_dmac_chan_read(chan, RCAR_DMACHCR);
>>> +
>>> + if (!(chcr & RCAR_DMACHCR_DE))
>>> + return 0;
>>> + cpu_relax();
>>> + dev_dbg(chan->chan.device->dev, "DMA xfer couldn't be stopped");
>>> + } while (++i < NR_READS_TO_WAIT);
>>
>> Hm, this can be a *for* loop, no?
> Could you explain why would you prefer a for loop here? do..while
> makes sure even if NR_READS_TO_WAIT is set to 0, the stop action takes
> place
Hm, this doesn't make sense to me. If # of reads is 0, we shouldn't read, no?
>> Please don't change the existing indentation, it doesn't seem like you're changing anything else here
> ok. How should I send the updates patch though, through replying to
> this email or a new thread?
New thread I think.
> Thanks!
> Hamza
MBR, Sergei
next prev parent reply other threads:[~2015-09-21 17:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-20 19:10 [RESEND PATCH 1/6] dma: rcar-dma: add wait after stopping dma engine hamzahfrq.sub
2015-09-21 8:59 ` Sergei Shtylyov
2015-09-21 11:30 ` Hamza Farooq
2015-09-21 15:24 ` Vinod Koul
2015-09-21 17:39 ` Sergei Shtylyov [this message]
2015-09-22 7:41 ` Hamza Farooq
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=560040D0.9050806@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=linux-sh@vger.kernel.org \
/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.