Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753741AbbEAOZD (ORCPT ); Fri, 1 May 2015 10:25:03 -0400 Received: from www.osadl.org ([62.245.132.105]:47879 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753499AbbEAOY7 (ORCPT ); Fri, 1 May 2015 10:24:59 -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 3/3] mtd: sh_flctl: remove unused variable and assignment Date: Fri, 1 May 2015 16:16:03 +0200 Message-Id: <1430489763-18417-3-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1430489763-18417-1-git-send-email-hofrat@osadl.org> References: <1430489763-18417-1-git-send-email-hofrat@osadl.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1674 Lines: 50 Fixes a compile warning [-Wunused-but-set-variable] only. Signed-off-by: Nicholas Mc Guire --- 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. 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 { -- 1.7.10.4 -- 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/