From patchwork Thu Aug 15 13:55:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akinobu Mita X-Patchwork-Id: 267388 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (unknown [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 15AC82C0254 for ; Thu, 15 Aug 2013 23:56:39 +1000 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V9y2S-0004ip-Mj; Thu, 15 Aug 2013 13:56:32 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V9y2Q-0006yS-MR; Thu, 15 Aug 2013 13:56:30 +0000 Received: from mail-pd0-x22e.google.com ([2607:f8b0:400e:c02::22e]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V9y2K-0006w0-DU for linux-mtd@lists.infradead.org; Thu, 15 Aug 2013 13:56:25 +0000 Received: by mail-pd0-f174.google.com with SMTP id y13so873615pdi.19 for ; Thu, 15 Aug 2013 06:56:02 -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:in-reply-to:references; bh=8sgfe0h5EWEIcphJo02L0yhrWqyUdMhCPpJYKnU1eEk=; b=DPmmVlzN9hJ420TSFikvsQiyxU9TmWlMY76wu3qRgr5cG8CCUUFULpbpK9bYbvDog3 chc+JOtxphiabYO49rdIqqZQbpc1g4CTUZ/5NKUL8OprvvsXs32Yube6zQldsmsVmOnz Dinlj9rvqI2l9M88EQWWZFoQ9gFSbjZ4rjs8EupOdkgTXh4GocXiZVc9mfWkba8FfCyB 9mrjUiJYjPvVTNgFV1s+mI1oV+/hun+MrP7ajD/pgaKKVLO+vfUG79l7zn0muiYioJ6S pyZZVRRbPWiRmDHwz935GkLiWrcD/Gpg/tEKs3EzylGo/fuu+RbhhtVxrALAMNaRRhas EO2Q== X-Received: by 10.68.131.99 with SMTP id ol3mr15722834pbb.130.1376574962118; Thu, 15 Aug 2013 06:56:02 -0700 (PDT) Received: from localhost.localdomain (KD113145060135.ppp-bb.dion.ne.jp. [113.145.60.135]) by mx.google.com with ESMTPSA id yg1sm139476pbb.1.2013.08.15.06.56.00 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Aug 2013 06:56:01 -0700 (PDT) From: Akinobu Mita To: linux-mtd@lists.infradead.org Subject: [PATCH -next 1/4] mtd: pagetest: remove always true condition Date: Thu, 15 Aug 2013 22:55:06 +0900 Message-Id: <1376574909-7507-2-git-send-email-akinobu.mita@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1376574909-7507-1-git-send-email-akinobu.mita@gmail.com> References: <1376574909-7507-1-git-send-email-akinobu.mita@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130815_095624_626106_E794A397 X-CRM114-Status: GOOD ( 11.74 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (akinobu.mita[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Artem Bityutskiy , Vikram Narayanan , Akinobu Mita , Adrian Hunter , Brian Norris , David Woodhouse 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 Remove useless checks just after checking 'err' is not zero. These checks should have been removed when converting to use mtdtest_read(). Signed-off-by: Akinobu Mita Cc: Brian Norris Cc: Vikram Narayanan Cc: Adrian Hunter Cc: Artem Bityutskiy Cc: David Woodhouse Cc: linux-mtd@lists.infradead.org --- drivers/mtd/tests/pagetest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/tests/pagetest.c b/drivers/mtd/tests/pagetest.c index 22cc38c..8318976 100644 --- a/drivers/mtd/tests/pagetest.c +++ b/drivers/mtd/tests/pagetest.c @@ -272,7 +272,7 @@ static int erasecrosstest(void) if (err) { pr_err("error: read failed at %#llx\n", (long long)addr0); - return err ? err : -1; + return err; } pr_info("verifying 1st page of block %d\n", ebnum); @@ -308,7 +308,7 @@ static int erasecrosstest(void) if (err) { pr_err("error: read failed at %#llx\n", (long long)addr0); - return err ? err : -1; + return err; } pr_info("verifying 1st page of block %d\n", ebnum); @@ -361,7 +361,7 @@ static int erasetest(void) if (err) { pr_err("error: read failed at %#llx\n", (long long)addr0); - return err ? err : -1; + return err; } pr_info("verifying 1st page of block %d is all 0xff\n",