From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SmjDH-0008JR-Sy for barebox@lists.infradead.org; Thu, 05 Jul 2012 10:23:14 +0000 Received: from localhost.localdomain (unknown [82.240.38.71]) by smtp2-g21.free.fr (Postfix) with ESMTP id 5E6284B002C for ; Thu, 5 Jul 2012 12:22:48 +0200 (CEST) From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Thu, 5 Jul 2012 12:22:45 +0200 Message-Id: <1341483767-20487-1-git-send-email-eric@eukrea.com> 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 1/3] string: add strim for ONFI code To: barebox@lists.infradead.org U2lnbmVkLW9mZi1ieTogRXJpYyBCw6luYXJkIDxlcmljQGV1a3JlYS5jb20+Ci0tLQogaW5jbHVk ZS9saW51eC9zdHJpbmcuaCB8ICAgIDMgKysrCiBsaWIvc3RyaW5nLmMgICAgICAgICAgIHwgICAz OSArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysKIDIgZmlsZXMgY2hhbmdl ZCwgNDIgaW5zZXJ0aW9ucygrKSwgMCBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9pbmNsdWRl L2xpbnV4L3N0cmluZy5oIGIvaW5jbHVkZS9saW51eC9zdHJpbmcuaAppbmRleCA2MmQ3NDNlLi5h ZmQwYWE2IDEwMDY0NAotLS0gYS9pbmNsdWRlL2xpbnV4L3N0cmluZy5oCisrKyBiL2luY2x1ZGUv bGludXgvc3RyaW5nLmgKQEAgLTkzLDYgKzkzLDkgQEAgZXh0ZXJuIGludCBtZW1jbXAoY29uc3Qg d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