From patchwork Thu Nov 24 10:57:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Weitzel X-Patchwork-Id: 127474 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BBC28B71C0 for ; Thu, 24 Nov 2011 21:59:20 +1100 (EST) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RTWzo-0002W5-FQ; Thu, 24 Nov 2011 10:57:36 +0000 Received: from bombadil.infradead.org ([2001:4830:2446:ff00:4687:fcff:fea6:5117]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RTWzm-0002W0-Hd for linux-mtd@merlin.infradead.org; Thu, 24 Nov 2011 10:57:34 +0000 Received: from mail.visioncatalog.com ([217.6.246.34] helo=root.phytec.de) by bombadil.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RTWzk-0007sO-56 for linux-mtd@lists.infradead.org; Thu, 24 Nov 2011 10:57:33 +0000 Received: from idefix.phytec.de (idefix.phytec.de [172.16.0.10]) by root.phytec.de (Postfix) with ESMTP id 0FE34BF0DC for ; Thu, 24 Nov 2011 12:02:30 +0100 (CET) Received: from numalfix.phytec.de ([127.0.0.1]) by idefix.phytec.de (Lotus Domino Release 8.5.3) with ESMTP id 2011112411572211-57903 ; Thu, 24 Nov 2011 11:57:22 +0100 Received: by numalfix.phytec.de (Postfix, from userid 1002) id 1962E1A0B6F; Thu, 24 Nov 2011 11:57:22 +0100 (CET) From: Jan Weitzel To: linux-mtd@lists.infradead.org Subject: [PATCH] nandtest: set oldstats.failed Date: Thu, 24 Nov 2011 11:57:21 +0100 Message-Id: <1322132241-5778-1-git-send-email-j.weitzel@phytec.de> X-Mailer: git-send-email 1.7.0.4 X-MIMETrack: Itemize by SMTP Server on Idefix/Phytec(Release 8.5.3|September 15, 2011) at 24.11.2011 11:57:22, Serialize by Router on Idefix/Phytec(Release 8.5.3|September 15, 2011) at 24.11.2011 11:57:22, Serialize complete at 24.11.2011 11:57:22 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20111124_055732_422262_C2E95932 X-CRM114-Status: GOOD ( 11.39 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Jan Weitzel X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.14 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-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org if new ecc failed occures oldstats.corrected is updated not oldstats.failed Signed-off-by: Jan Weitzel --- nandtest.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/nandtest.c b/nandtest.c index dc28d09..db7f427 100644 --- a/nandtest.c +++ b/nandtest.c @@ -105,7 +105,7 @@ int erase_and_write(loff_t ofs, unsigned char *data, unsigned char *rbuf) } if (newstats.failed > oldstats.failed) { printf("\nECC failed at %08x\n", (unsigned) ofs); - oldstats.corrected = newstats.corrected; + oldstats.failed = newstats.failed; } if (len < meminfo.erasesize) exit(1);