From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.microcatalog.org.uk ([217.6.246.34] helo=root.phytec.de) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Yca9K-0000qL-B5 for barebox@lists.infradead.org; Mon, 30 Mar 2015 13:54:43 +0000 From: =?UTF-8?q?Teresa=20G=C3=A1mez?= Date: Mon, 30 Mar 2015 15:51:05 +0200 Message-Id: <1427723465-9306-2-git-send-email-t.gamez@phytec.de> In-Reply-To: <1427723465-9306-1-git-send-email-t.gamez@phytec.de> References: <1427723465-9306-1-git-send-email-t.gamez@phytec.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/2] mtd: nand_omap_gpmc: Fix ecc check for bch8 romcode To: barebox@lists.infradead.org VGhlIGJjaDggcm9tY29kZSB3YXMgb25seSBjaGVja2VkIGFuZCBjb3JyZWN0ZWQgZm9yIHRoZQpm aXJzdCA1MTIgYnl0ZXMgb2YgYSAyMDQ4IGJ5dGUgcGFnZS4gU2V0IGludGVyYXRpb24gY291bnRl cgphbmQgZWNjc2l6ZXMgY29ycmVjdCBmb3IgdGhlIGRpZmZlcmVudCBiY2ggdHlwZXMuCgpUZXN0 ZWQgT01BUF9FQ0NfQkNIOF9DT0RFX0hXIGFuZCBPTUFQX0VDQ19CQ0g4X0NPREVfSFdfUk9NQ09E RS4KClJlcG9ydGVkLWJ5OiBHYWJvciBKYW5hayA8Zy5qYW5ha0BhZ2lsaW9uLmRlPgpTaWduZWQt b2ZmLWJ5OiBUZXJlc2EgR8OhbWV6IDx0LmdhbWV6QHBoeXRlYy5kZT4KLS0tCiBkcml2ZXJzL210 ZC9uYW5kL25hbmRfb21hcF9ncG1jLmMgfCAzOCArKysrKysrKysrKysrKysrKys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