From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751667AbbEBIG0 (ORCPT ); Sat, 2 May 2015 04:06:26 -0400 Received: from www.osadl.org ([62.245.132.105]:52786 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750866AbbEBIFu (ORCPT ); Sat, 2 May 2015 04:05:50 -0400 From: Nicholas Mc Guire To: David Woodhouse Cc: Brian Norris , Vinod Koul , Laurent Pinchart , Kuninori Morimoto , Wolfram Sang , Arnd Bergmann , linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH 2/4] mtd: sh_flctl: drop unused variable Date: Sat, 2 May 2015 09:57:08 +0200 Message-Id: <1430553430-21396-2-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1430553430-21396-1-git-send-email-hofrat@osadl.org> References: <1430553430-21396-1-git-send-email-hofrat@osadl.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 { -- 1.7.10.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from www.osadl.org ([62.245.132.105]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YoSQg-0007Tw-MO for linux-mtd@lists.infradead.org; Sat, 02 May 2015 08:05:43 +0000 From: Nicholas Mc Guire To: David Woodhouse Subject: [PATCH 2/4] mtd: sh_flctl: drop unused variable Date: Sat, 2 May 2015 09:57:08 +0200 Message-Id: <1430553430-21396-2-git-send-email-hofrat@osadl.org> In-Reply-To: <1430553430-21396-1-git-send-email-hofrat@osadl.org> References: <1430553430-21396-1-git-send-email-hofrat@osadl.org> Cc: Laurent Pinchart , Kuninori Morimoto , Arnd Bergmann , Wolfram Sang , Vinod Koul , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, Nicholas Mc Guire , Brian Norris List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 --- 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 { -- 1.7.10.4