From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.rapiddevelopmentkit.de ([217.6.246.34] helo=root.phytec.de) by bombadil.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RYxGb-00018u-Vn for barebox@lists.infradead.org; Fri, 09 Dec 2011 10:01:23 +0000 From: =?UTF-8?q?Teresa=20G=C3=A1mez?= Date: Fri, 9 Dec 2011 11:00:58 +0100 Message-Id: <1323424858-14282-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-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] nand_omap_bch_decoder: Fix up error detection To: barebox@lists.infradead.org Cc: Steve Schefter RnJvbTogU3RldmUgU2NoZWZ0ZXIgPHN0ZXZlQHNjaGVmdGVjaC5jb20+CgpCaXQgZXJyb3JzIGlu IHRoZSBFQ0MgaXRzZWxmIGFyZSBub3QgYmVlaW5nIHRha2VuIGludG8gYWNjb3VudC4KSW4gdGhp cyBjYXNlcyB0aGUgbnVtYmVyIG9mIGRldGVjdGVkIGVycm9ycyAhPSBudW1iZXIgb2YgY29ycmVj dGVkIGVycm9ycyBhbmQKY2hpZW4gc2VhcmNoIHJldHVybnMgYW4gZXJyb3IuClRoaXMgcGF0Y2gg YWRkcyBkZXRlY3Rpb24gb2YgYml0IGVycm9ycyBpbiB0aGUgRUNDLgoKU2lnbmVkLW9mZi1ieTog U3RldmUgU2NoZWZ0ZXIgPHN0ZXZlQHNjaGVmdGVjaC5jb20+ClNpZ25lZC1vZmYtYnk6IFRlcmVz YSBHw6FtZXogPHQuZ2FtZXpAcGh5dGVjLmRlPgotLS0KIGRyaXZlcnMvbXRkL25hbmQvbmFuZF9v bWFwX2JjaF9kZWNvZGVyLmMgfCAgICA4ICsrKysrKy0tCiAxIG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GkgPSAx OyAoaSA8PSBubikgJiYgKChjb3VudCArIGVycm9yc2luZWNjKSA8IGVycl9udW1zKTsgaSsrKSB7 CiAKIAkJLyogUmVzdWx0IG9mIGV2YWx1YXRpb24gYXQgcm9vdCAqLwogCQllbHBfc3VtID0gMSBe IGdhbW1hc1swXSBeIGdhbW1hc1sxXSBeCkBAIC0xMDgsMTEgKzExMCwxMyBAQCBzdGF0aWMgaW50 IGNoaWVuKHVuc2lnbmVkIGludCBzZWxlY3RfNF84LCBpbnQgZXJyX251bXMsCiAJCQlpZiAoaSA+ PSAyICogZWNjX2JpdHMpCiAJCQkJbG9jYXRpb25bY291bnQrK10gPQogCQkJCQlra19zaG9ydGVu IC0gKGJpdCAtIDIgKiBlY2NfYml0cykgLSAxOworCQkJZWxzZQorCQkJCWVycm9yc2luZWNjKys7 CiAJCX0KIAl9CiAKIAkvKiBGYWlsdXJlOiBOby4gb2YgZGV0ZWN0ZWQgZXJyb3JzICE9IE5vLiBv ciBjb3JyZWN0ZWQgZXJyb3JzICovCi0JaWYgKGNvdW50ICE9IGVycl9udW1zKSB7CisJaWYgKChj b3VudCArIGVycm9yc2luZWNjKSAhPSBlcnJfbnVtcykgewogCQljb3VudCA9IC0xOwogCQlwcmlu dGsoS0VSTl9FUlIgIkJDSCBkZWNvZGluZyBmYWlsZWRcbiIpOwogCX0KLS0gCjEuNy4wLjQKCgpf X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpiYXJlYm94IG1h aWxpbmcgbGlzdApiYXJlYm94QGxpc3RzLmluZnJhZGVhZC5vcmcKaHR0cDovL2xpc3RzLmluZnJh ZGVhZC5vcmcvbWFpbG1hbi9saXN0aW5mby9iYXJlYm94Cg==