public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Nicholas Mc Guire <hofrat@osadl.org>
Cc: David Woodhouse <dwmw2@infradead.org>,
	Brian Norris <computersforpeace@gmail.com>,
	Vinod Koul <vinod.koul@intel.com>,
	Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.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 3/3] mtd: sh_flctl: remove unused variable and assignment
Date: Sat, 02 May 2015 02:07:37 +0300	[thread overview]
Message-ID: <2084504.Aj3JxUhj5c@avalon> (raw)
In-Reply-To: <1430489763-18417-3-git-send-email-hofrat@osadl.org>

Hi Nicholas,

Thank you for the patch.

On Friday 01 May 2015 16:16:03 Nicholas Mc Guire wrote:
> Fixes a compile warning [-Wunused-but-set-variable] only.
> 
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
> ---
> 
> This fixes the compile time warning:
> drivers/mtd/nand/sh_flctl.c: In function 'flctl_dma_fifo0_transfer':
> drivers/mtd/nand/sh_flctl.c:354:15: warning: variable 'cookie' set but not
> used [-Wunused-but-set-variable]
> 
> as dmaengine_submit only reads and returns desc->tx_submit(desc) which
> is then unused in flctl_dma_fifo0_transfer, this should be side-effect
> free to remove.

You can ignore its return value, but you can't remove the call to 
dmaengine_submit, as it's part of the DMA engine API and desc->tx_submit() 
does important work.

> 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 |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
> index b9f265a..6a5c4f7 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;
>  	unsigned long time_left;
> @@ -377,7 +376,6 @@ 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);
> 
>  		dma_async_issue_pending(chan);
>  	} else {

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2015-05-01 23:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-01 14:16 [PATCH 1/3] mtd: sh_flctl: fixup wait_for_completion_timeout return handling Nicholas Mc Guire
2015-05-01 14:16 ` [PATCH 2/3] mtd: sh_flctl: fix alignment of function argument Nicholas Mc Guire
2015-05-01 23:08   ` Laurent Pinchart
2015-05-01 14:16 ` [PATCH 3/3] mtd: sh_flctl: remove unused variable and assignment Nicholas Mc Guire
2015-05-01 23:07   ` Laurent Pinchart [this message]
2015-05-01 23:20 ` [PATCH 1/3] mtd: sh_flctl: fixup wait_for_completion_timeout return handling Laurent Pinchart
2015-05-02  6:49   ` Nicholas Mc Guire

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=2084504.Aj3JxUhj5c@avalon \
    --to=laurent.pinchart@ideasonboard.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+renesas@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