From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.phytec.de ([217.6.246.34] helo=root.phytec.de) by casper.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1b4lEg-00050t-Ar for barebox@lists.infradead.org; Mon, 23 May 2016 08:29:15 +0000 Received: from idefix.phytec.de (idefix.phytec.de [172.16.0.10]) by root.phytec.de (Postfix) with ESMTP id 6E0F7A00CC6 for ; Mon, 23 May 2016 10:28:23 +0200 (CEST) From: Teresa Remmet Date: Mon, 23 May 2016 10:26:10 +0200 Message-Id: <1463992010-31537-23-git-send-email-t.remmet@phytec.de> In-Reply-To: <1463992010-31537-1-git-send-email-t.remmet@phytec.de> References: <1463992010-31537-1-git-send-email-t.remmet@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 22/62] UBI: Fastmap: Don't allocate new ubi_wl_entry objects To: barebox@lists.infradead.org RnJvbTogUmljaGFyZCBXZWluYmVyZ2VyIDxyaWNoYXJkQG5vZC5hdD4KClRoZXJlIGlzIG5vIG5l ZWQgdG8gYWxsb2NhdGUgbmV3IG9uZXMgZXZlcnkgdGltZSwgd2UgY2FuIHJldXNlCnRoZSBleGlz dGluZyBvbmVzLgpUaGlzIG1ha2VzIHRoZSBjb2RlIGNsZWFuZXIgYW5kIG1vcmUgZWFzeSB0byBm b2xsb3cuCgpTaWduZWQtb2ZmLWJ5OiBSaWNoYXJkIFdlaW5iZXJnZXIgPHJpY2hhcmRAbm9kLmF0 PgpSZXZpZXdlZC1ieTogVGFueWEgQnJva2htYW4gPHRsaW5kZXJAY29kZWF1cm9yYS5vcmc+ClJl dmlld2VkLWJ5OiBHdWlkbyBNYXJ0w61uZXogPGd1aWRvQHZhbmd1YXJkaWFzdXIuY29tLmFyPg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