From patchwork Tue Mar 1 21:04:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 63347 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp2046439lbc; Tue, 1 Mar 2016 13:06:50 -0800 (PST) X-Received: by 10.98.34.13 with SMTP id i13mr27264312pfi.26.1456866410442; Tue, 01 Mar 2016 13:06:50 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id b8si29669547pas.137.2016.03.01.13.06.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Mar 2016 13:06:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-mtd-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-mtd-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org 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 1aarT4-0001GI-5V; Tue, 01 Mar 2016 21:04:30 +0000 Received: from mail-ig0-x231.google.com ([2607:f8b0:4001:c05::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aarT0-00019o-Q3 for linux-mtd@lists.infradead.org; Tue, 01 Mar 2016 21:04:27 +0000 Received: by mail-ig0-x231.google.com with SMTP id y8so27960870igp.1 for ; Tue, 01 Mar 2016 13:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=PR5SB7TWyxXjXZ0cx/EislVt0hRzTtnNU+EERDE3CrE=; b=WhYt6cwRUUu6doUXdKH6gvHNEYod50xh2u1FeDw/ySbZTvK2xczQKi4L1Wz/5ArGtJ zIBs7FfMpHzKAsRsxa1Oz6KpwyoBTNB47tu/pv4CaClHkv6TATMrNrrBxmlOzSf4mGBr nFe+9tiW17jwCnYRxPKODXWv2Hh0rlQHRXZJA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=PR5SB7TWyxXjXZ0cx/EislVt0hRzTtnNU+EERDE3CrE=; b=DDN6jBIv+f6AI9tImKNPQTRgF8303QPWC/hNziicvVkL9imShpgbTz79Srm9LNMutB aqGhVALA4a77/Lew9rAvvzKmcuwiX2J08VeNACQ7SXstuHUrR5ZeBMt82sKCvuVwzGqu THoWoqkkLjsoqEgUDMEhQOuGcWJZxlbUdsNqzK138UwP24FT7AsRdsEv4HMSXiJXk5/F CdoJxVa4b3cMAyQpXW3QpjJUnwjIkiOsUbk0mI2vFTwzOV0GexzghAKkpnyNGP1MVQQB qvcTOlMzbb5kg+2DqQhugd3DUthcHB2ijbRgWRJ/ZZhBrJx0B8A3JrwoNcIBocc0KxWW 0kcQ== X-Gm-Message-State: AD7BkJKKelzAbbg/FrNi9vqG0IVRa/4KHqZHl9XuYiEE0rzON2eewbR6kd0HhXySHvBlqiNO X-Received: by 10.50.225.106 with SMTP id rj10mr1083617igc.23.1456866245710; Tue, 01 Mar 2016 13:04:05 -0800 (PST) Received: from localhost.localdomain (cpe-67-253-128-196.rochester.res.rr.com. [67.253.128.196]) by smtp.gmail.com with ESMTPSA id s38sm13452700ioe.33.2016.03.01.13.04.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Mar 2016 13:04:04 -0800 (PST) From: Jorge Ramirez-Ortiz To: jorge.ramirez-ortiz@linaro.org, boris.brezillon@free-electrons.com, fcooper@ti.com, computersforpeace@gmail.com Subject: [PATCH] mtd: nand: tests: fix regression introduced in mtd_nandectest Date: Tue, 1 Mar 2016 16:04:00 -0500 Message-Id: <1456866240-26119-1-git-send-email-jorge.ramirez-ortiz@linaro.org> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160301_130427_122553_A31CA3DD X-CRM114-Status: GOOD ( 10.54 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:4001:c05:0:0:0:231 listed in] [list.dnswl.org] -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 X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: daniel.thompson@linaro.org, linux-mtd@lists.infradead.org, xiaolei.li@mediatek.com MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org Offending Commit: 6e94119 "mtd: nand: return consistent error codes in ecc.correct() implementations" The new error code was not being handled properly in double bit error detection. Signed-off-by: Jorge Ramirez-Ortiz --- drivers/mtd/tests/mtd_nandecctest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.1.4 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/ diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c index 7931615..88b6c81 100644 --- a/drivers/mtd/tests/mtd_nandecctest.c +++ b/drivers/mtd/tests/mtd_nandecctest.c @@ -187,7 +187,7 @@ static int double_bit_error_detect(void *error_data, void *error_ecc, __nand_calculate_ecc(error_data, size, calc_ecc); ret = __nand_correct_data(error_data, error_ecc, calc_ecc, size); - return (ret == -1) ? 0 : -EINVAL; + return (ret == -EBADMSG) ? 0 : -EINVAL; } static const struct nand_ecc_test nand_ecc_test[] = {