From patchwork Wed May 28 08:52:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brian Norris X-Patchwork-Id: 353285 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 8C1D914009F for ; Wed, 28 May 2014 18:54:24 +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 1WpZbf-0008Sp-Ax; Wed, 28 May 2014 08:53:07 +0000 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WpZbd-0008MG-MX for linux-mtd@lists.infradead.org; Wed, 28 May 2014 08:53:06 +0000 Received: by mail-pa0-f51.google.com with SMTP id kq14so10699592pab.38 for ; Wed, 28 May 2014 01:52:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=6FSpp4qkDO0vqWlzc+PD4q7dlhAaU9/1HwhoWm8MaTw=; b=zuCSWoU52Z+eJp5g2Zvf2s4CJ+SvjNHFFJHlkG94OHcZUL9/DefJrC0e+vkGkF9Exf 3kmEEqrJjR4yzcvZHRv9CMGKmXEOXCoDz/lvEcN+UoYwm3KXutnx5jTc4e2zsaDwcM2z 6Qibg3w5DS5vYmO7LOFcPMW9wHWGMjVTJm90ZTDvB8qT56gwRdYHUgXnfDp49MonP4BY UYejbVCZuQcUXTSOVdiYIBNmJH0Pm97CLMczhOG3iiFPsKkZoG+Ch6Vc28Zrhp7dyjYu DlHO+mFzU3Ot+4dCTUZQ0abJl2KSaMU2Y1TtAVyvOC5rQk4MHYvAX2QP1IuOWyiNpdVv ksEw== X-Received: by 10.66.230.193 with SMTP id ta1mr44844824pac.29.1401267164697; Wed, 28 May 2014 01:52:44 -0700 (PDT) Received: from norris-Latitude-E6410.socal.rr.com (cpe-98-154-223-43.socal.res.rr.com. [98.154.223.43]) by mx.google.com with ESMTPSA id zc10sm48690393pac.46.2014.05.28.01.52.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 28 May 2014 01:52:44 -0700 (PDT) From: Brian Norris To: Subject: [PATCH] mtd: lpc32xx: drop bitflip_threshold initialization Date: Wed, 28 May 2014 01:52:25 -0700 Message-Id: <1401267145-18218-1-git-send-email-computersforpeace@gmail.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140528_015305_755320_96AB8C7B X-CRM114-Status: UNSURE ( 8.63 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (computersforpeace[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Cc: Roland Stigge , Brian Norris X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 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 These drivers don't need to explicitly initialize their bitflip thresholds. The comment is no longer correct, since nand_scan_tail() performs this initialization as of the following commit: commit ea3b2ea24ef0f2ef9c6795b19cff456195b6728a Author: Shmulik Ladkani Date: Fri Jun 8 18:29:06 2012 +0300 mtd: nand: initialize bitflip_threshold prior to BBT scanning (It seems there were some parallel efforts on writing/submitting these drivers, and Shmulik's bug fix.) Signed-off-by: Brian Norris Cc: Roland Stigge --- Not tested drivers/mtd/nand/lpc32xx_mlc.c | 6 ------ drivers/mtd/nand/lpc32xx_slc.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/lpc32xx_mlc.c index 687478c9f09c..7335346dc126 100644 --- a/drivers/mtd/nand/lpc32xx_mlc.c +++ b/drivers/mtd/nand/lpc32xx_mlc.c @@ -721,12 +721,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) nand_chip->bbt_td = &lpc32xx_nand_bbt; nand_chip->bbt_md = &lpc32xx_nand_bbt_mirror; - /* bitflip_threshold's default is defined as ecc_strength anyway. - * Unfortunately, it is set only later at add_mtd_device(). Meanwhile - * being 0, it causes bad block table scanning errors in - * nand_scan_tail(), so preparing it here. */ - mtd->bitflip_threshold = nand_chip->ecc.strength; - if (use_dma) { res = lpc32xx_dma_setup(host); if (res) { diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c index 53a6742e3da3..8caef28e0756 100644 --- a/drivers/mtd/nand/lpc32xx_slc.c +++ b/drivers/mtd/nand/lpc32xx_slc.c @@ -840,12 +840,6 @@ static int lpc32xx_nand_probe(struct platform_device *pdev) chip->ecc.strength = 1; chip->ecc.hwctl = lpc32xx_nand_ecc_enable; - /* bitflip_threshold's default is defined as ecc_strength anyway. - * Unfortunately, it is set only later at add_mtd_device(). Meanwhile - * being 0, it causes bad block table scanning errors in - * nand_scan_tail(), so preparing it here already. */ - mtd->bitflip_threshold = chip->ecc.strength; - /* * Allocate a large enough buffer for a single huge page plus * extra space for the spare area and ECC storage area