From: Nicholas Mc Guire <der.herr@hofr.at>
To: Vinod Koul <vinod.koul@intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Nicholas Mc Guire <hofrat@osadl.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Wolfram Sang <wsa@the-dreams.de>, Arnd Bergmann <arnd@arndb.de>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] mtd: sh_flctl: drop unused variable
Date: Mon, 4 May 2015 08:03:46 +0200 [thread overview]
Message-ID: <20150504060346.GB26350@opentech.at> (raw)
In-Reply-To: <20150504051723.GW3521@localhost>
On Mon, 04 May 2015, Vinod Koul wrote:
> On Sun, May 03, 2015 at 10:33:43PM +0300, Laurent Pinchart wrote:
> > Hi Nicholas,
> >
> > Thank you for the patch.
> >
> > On Saturday 02 May 2015 09:57:08 Nicholas Mc Guire wrote:
> > > shdma_tx_submit() called via dmaengine_submit() returns the assigned
> > > cookie but this is not used here so the variable and assignment can
> > > be dropped.
> > >
> > > Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> >
> > I would rephrase the commit message to avoid mentioning shdma_tx_submit() as
> > that's not relevant. Something like "dmaengine_submit() returns the assigned
> > cookie but this is not used here so the variable and assignment can be
> > dropped."
> And I am bit surrised about taht. Ideally the driver should use the cookie
> to check the status later on...
>
looking at other drivers it seems like the drivers should call
dma_submit_error(cookie); on the received cookie - which does:
return cookie < 0 ? cookie : 0;
but doing that after dmaengine_submit() which actually already queued the
this request in shdma_base.cc:shdma_tx_submit() might not be that helpful
and looking at dma_cookie_assign() I do not see how the condition that
dma_submit_error is checking for ever could occur as it can't go below
cookie = DMA_MIN_COOKIE which is defined to 1 (include/linux/dmaengine.h)
As other drivers seem to not be doing more with the returned cookie than
calling dma_submit_error() on it this seems ok here ...but I'm not that
deep into this - my starting point was a simple API inconsisteny in the
use of wait_for_completion_timeout() :)
thx!
hofrat
next prev parent reply other threads:[~2015-05-04 6:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-02 7:57 [PATCH 1/4] mtd: sh_flctl: let flctl_dma_fifo0_transfer return 0 on success Nicholas Mc Guire
2015-05-02 7:57 ` [PATCH 2/4] mtd: sh_flctl: drop unused variable Nicholas Mc Guire
2015-05-03 19:33 ` Laurent Pinchart
2015-05-04 5:17 ` Vinod Koul
2015-05-04 6:03 ` Nicholas Mc Guire [this message]
2015-05-04 7:53 ` Laurent Pinchart
2015-05-10 13:49 ` Nicholas Mc Guire
2015-05-02 7:57 ` [PATCH 3/4] mtd: sh_flctl: fix function parameter alignment Nicholas Mc Guire
2015-05-02 7:57 ` [PATCH 4/4] mtd: sh_flctl: fix wrapped condition alignment Nicholas Mc Guire
2015-05-04 5:21 ` Vinod Koul
2015-05-04 5:43 ` Nicholas Mc Guire
2015-05-04 7:05 ` Joe Perches
2015-05-03 19:35 ` [PATCH 1/4] mtd: sh_flctl: let flctl_dma_fifo0_transfer return 0 on success Laurent Pinchart
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=20150504060346.GB26350@opentech.at \
--to=der.herr@hofr.at \
--cc=arnd@arndb.de \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=hofrat@osadl.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=vinod.koul@intel.com \
--cc=wsa@the-dreams.de \
/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®