From patchwork Tue Sep 16 11:04:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 390039 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D491C140142 for ; Tue, 16 Sep 2014 21:06:50 +1000 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XTqZY-0007Wn-Hb; Tue, 16 Sep 2014 11:05:24 +0000 Received: from smtp.mei.co.jp ([133.183.100.20]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XTqZV-0006Lh-6u for linux-mtd@lists.infradead.org; Tue, 16 Sep 2014 11:05:21 +0000 Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile11) with ESMTP id s8GB4kfJ012426; Tue, 16 Sep 2014 20:04:46 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili14) with ESMTP id s8GB4lL07500; Tue, 16 Sep 2014 20:04:47 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi13) id s8GB4lg4031593; Tue, 16 Sep 2014 20:04:47 +0900 Received: from poodle by lomi13.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id s8GB4k3m031540; Tue, 16 Sep 2014 20:04:46 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id A1C6F2740043; Tue, 16 Sep 2014 20:04:46 +0900 (JST) From: Masahiro Yamada To: linux-mtd@lists.infradead.org Subject: [PATCH v3 5/7] mtd: denali: remove a set-but-unused variable Date: Tue, 16 Sep 2014 20:04:23 +0900 Message-Id: <1410865465-17941-6-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1410865465-17941-1-git-send-email-yamada.m@jp.panasonic.com> References: <1410865465-17941-1-git-send-email-yamada.m@jp.panasonic.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140916_040521_541734_AB1D27A7 X-CRM114-Status: UNSURE ( 8.66 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [133.183.100.20 listed in list.dnswl.org] Cc: David Woodhouse , Josh Triplett , linux-kernel@vger.kernel.org, Masahiro Yamada , Rashika Kheria , "grmoore@altera.com" , Brian Norris , Huang Shijie X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The variable "retry" in wait_for_irq() is set, but not used. Likewise, for "irq_status" in denali_read_page_raw(). Signed-off-by: Masahiro Yamada Reviewed-by: Josh Triplett --- Changes in v3: - Remove also set-but-unused irq_status Changes in v2: None drivers/mtd/nand/denali.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c index 4cb1497..e5c39d2 100644 --- a/drivers/mtd/nand/denali.c +++ b/drivers/mtd/nand/denali.c @@ -697,7 +697,6 @@ static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask) { unsigned long comp_res; uint32_t intr_status; - bool retry = false; unsigned long timeout = msecs_to_jiffies(1000); do { @@ -717,7 +716,6 @@ static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask) * need to wait again */ spin_unlock_irq(&denali->irq_lock); - retry = true; } } while (comp_res != 0); @@ -1220,7 +1218,6 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, dma_addr_t addr = denali->buf.dma_buf; size_t size = denali->mtd.writesize + denali->mtd.oobsize; - uint32_t irq_status; uint32_t irq_mask = INTR_STATUS__DMA_CMD_COMP; if (page != denali->page) { @@ -1239,7 +1236,7 @@ static int denali_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip, denali_setup_dma(denali, DENALI_READ); /* wait for operation to complete */ - irq_status = wait_for_irq(denali, irq_mask); + wait_for_irq(denali, irq_mask); dma_sync_single_for_cpu(denali->dev, addr, size, DMA_FROM_DEVICE);