Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752051AbbEDFQ4 (ORCPT ); Mon, 4 May 2015 01:16:56 -0400 Received: from mga09.intel.com ([134.134.136.24]:7576 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbbEDFQt (ORCPT ); Mon, 4 May 2015 01:16:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,364,1427785200"; d="scan'208";a="720128059" Date: Mon, 4 May 2015 10:47:23 +0530 From: Vinod Koul To: Laurent Pinchart Cc: Nicholas Mc Guire , Kuninori Morimoto , David Woodhouse , Brian Norris , Wolfram Sang , Arnd Bergmann , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/4] mtd: sh_flctl: drop unused variable Message-ID: <20150504051723.GW3521@localhost> References: <1430553430-21396-1-git-send-email-hofrat@osadl.org> <1430553430-21396-2-git-send-email-hofrat@osadl.org> <1477205.SvYxjlTIEF@avalon> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1477205.SvYxjlTIEF@avalon> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2448 Lines: 75 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 > > 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 > > > --- > > > > V2: As pointed out by Laurent Pinchart > > 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 > -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/