From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YJTs5-0000Yu-Uu for barebox@lists.infradead.org; Thu, 05 Feb 2015 21:21:59 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 5 Feb 2015 22:21:31 +0100 Message-Id: <1423171292-26728-3-git-send-email-u.kleine-koenig@pengutronix.de> In-Reply-To: <1423171292-26728-1-git-send-email-u.kleine-koenig@pengutronix.de> References: <1423171292-26728-1-git-send-email-u.kleine-koenig@pengutronix.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/3] mtd: nand: cleanup ONFI printed errors, warnings To: barebox@lists.infradead.org Cc: Brian Norris RnJvbTogQnJpYW4gTm9ycmlzIDxjb21wdXRlcnNmb3JwZWFjZUBnbWFpbC5jb20+CgpUaGlzIGNv cnJlc3BvbmRzIHRvIGNvbW1pdCBjN2YyM2E3MDYzNTg5NWI1MTI1YWViNTU5M2FhZjhjYjQ0ZDNh MDg4IGluCnRoZSBMaW51eCBrZXJuZWwuCgpPbmUgbm90YWJsZSBkaWZmZXJlbmNlIGlzIGhvd2V2 ZXIgdGhhdCBPTkZJIGRldGVjdGlvbiBpcyBhbGxvd2VkIGhlcmUKZXZlbiBpbiAxNi1iaXQgbW9k ZS4gVGhpcyBpcyBwcm92ZWQgdG8gd29yayBmaW5lIG9uIGFuIGkuTVgyNSBiYXNlZAptYWNoaW5l IHdpdGggYSB4MTYgTkFORC4KClNpZ25lZC1vZmYtYnk6IEJyaWFuIE5vcnJpcyA8Y29tcHV0ZXJz Zm9ycGVhY2VAZ21haWwuY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