From: Vinod Koul <vinod.koul@intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Arnd Bergmann <arnd@arndb.de>, Wolfram Sang <wsa@the-dreams.de>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org,
Nicholas Mc Guire <hofrat@osadl.org>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH 2/4] mtd: sh_flctl: drop unused variable
Date: Mon, 4 May 2015 10:47:23 +0530 [thread overview]
Message-ID: <20150504051723.GW3521@localhost> (raw)
In-Reply-To: <1477205.SvYxjlTIEF@avalon>
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...
--
~Vinod
>
> With that fixed,
>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> > ---
> >
> > V2: As pointed out by Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > the variable and assignment can be dropped but not the call to
> > dmaengine_submit(desc) - fixed up
> >
> > Patch was compile tested with ap325rxa_defconfig (implies
> > CONFIG_MTD_NAND_SH_FLCTL=y)
> >
> > Patch is against 4.1-rc1 (localversion-next is -next-20150501)
> >
> > drivers/mtd/nand/sh_flctl.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
> > index 9b032dd..d1c46e5 100644
> > --- a/drivers/mtd/nand/sh_flctl.c
> > +++ b/drivers/mtd/nand/sh_flctl.c
> > @@ -351,7 +351,6 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl
> > *flctl, unsigned long *buf, struct dma_chan *chan;
> > enum dma_transfer_direction tr_dir;
> > dma_addr_t dma_addr;
> > - dma_cookie_t cookie = -EINVAL;
> > uint32_t reg;
> > int ret = 0;
> > unsigned long time_left;
> > @@ -377,7 +376,7 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl
> > *flctl, unsigned long *buf,
> >
> > desc->callback = flctl_dma_complete;
> > desc->callback_param = flctl;
> > - cookie = dmaengine_submit(desc);
> > + dmaengine_submit(desc);
> >
> > dma_async_issue_pending(chan);
> > } else {
>
> --
> Regards,
>
> Laurent Pinchart
>
--
WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vinod.koul@intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: 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 10:47:23 +0530 [thread overview]
Message-ID: <20150504051723.GW3521@localhost> (raw)
In-Reply-To: <1477205.SvYxjlTIEF@avalon>
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...
--
~Vinod
>
> With that fixed,
>
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> > ---
> >
> > V2: As pointed out by Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > the variable and assignment can be dropped but not the call to
> > dmaengine_submit(desc) - fixed up
> >
> > Patch was compile tested with ap325rxa_defconfig (implies
> > CONFIG_MTD_NAND_SH_FLCTL=y)
> >
> > Patch is against 4.1-rc1 (localversion-next is -next-20150501)
> >
> > drivers/mtd/nand/sh_flctl.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
> > index 9b032dd..d1c46e5 100644
> > --- a/drivers/mtd/nand/sh_flctl.c
> > +++ b/drivers/mtd/nand/sh_flctl.c
> > @@ -351,7 +351,6 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl
> > *flctl, unsigned long *buf, struct dma_chan *chan;
> > enum dma_transfer_direction tr_dir;
> > dma_addr_t dma_addr;
> > - dma_cookie_t cookie = -EINVAL;
> > uint32_t reg;
> > int ret = 0;
> > unsigned long time_left;
> > @@ -377,7 +376,7 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl
> > *flctl, unsigned long *buf,
> >
> > desc->callback = flctl_dma_complete;
> > desc->callback_param = flctl;
> > - cookie = dmaengine_submit(desc);
> > + dmaengine_submit(desc);
> >
> > dma_async_issue_pending(chan);
> > } else {
>
> --
> Regards,
>
> Laurent Pinchart
>
--
next prev parent reply other threads:[~2015-05-04 5:17 UTC|newest]
Thread overview: 26+ 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 ` Nicholas Mc Guire
2015-05-02 7:57 ` [PATCH 2/4] mtd: sh_flctl: drop unused variable Nicholas Mc Guire
2015-05-02 7:57 ` Nicholas Mc Guire
2015-05-03 19:33 ` Laurent Pinchart
2015-05-03 19:33 ` Laurent Pinchart
2015-05-04 5:17 ` Vinod Koul [this message]
2015-05-04 5:17 ` Vinod Koul
2015-05-04 6:03 ` Nicholas Mc Guire
2015-05-04 6:03 ` Nicholas Mc Guire
2015-05-04 7:53 ` Laurent Pinchart
2015-05-04 7:53 ` Laurent Pinchart
2015-05-10 13:49 ` Nicholas Mc Guire
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 ` Nicholas Mc Guire
2015-05-02 7:57 ` [PATCH 4/4] mtd: sh_flctl: fix wrapped condition alignment Nicholas Mc Guire
2015-05-02 7:57 ` Nicholas Mc Guire
2015-05-04 5:21 ` Vinod Koul
2015-05-04 5:21 ` Vinod Koul
2015-05-04 5:43 ` Nicholas Mc Guire
2015-05-04 5:43 ` Nicholas Mc Guire
2015-05-04 7:05 ` Joe Perches
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
2015-05-03 19:35 ` 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=20150504051723.GW3521@localhost \
--to=vinod.koul@intel.com \
--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=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 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.