From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from dedi548.your-server.de ([85.10.215.148]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jvH2X-0005g0-C5 for barebox@lists.infradead.org; Tue, 14 Jul 2020 09:15:54 +0000 References: <20200714091139.26244-1-christian.mauderer@embedded-brains.de> <9eabadb9-60d8-c772-59c1-516cffb7aaaa@pengutronix.de> From: Christian Mauderer Message-ID: <9d25cb88-0aaa-630a-00d0-c1c338dd476e@embedded-brains.de> Date: Tue, 14 Jul 2020 11:15:50 +0200 MIME-Version: 1.0 In-Reply-To: <9eabadb9-60d8-c772-59c1-516cffb7aaaa@pengutronix.de> Content-Language: en-US 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: Re: [PATCH v4] FIT: Parse `load` and `entry` addresses. To: Ahmad Fatoum , barebox@lists.infradead.org T24gMTQvMDcvMjAyMCAxMToxNSwgQWhtYWQgRmF0b3VtIHdyb3RlOgo+IE9uIDcvMTQvMjAgMTE6 MTEgQU0sIENocmlzdGlhbiBNYXVkZXJlciB3cm90ZToKPj4gQWNjb3JkaW5nIHRvIHRoZSBVLUJv b3QgZG9jdW1lbnRhdGlvbiBmb3IgdGhlIEZJVCBmaWxlIGZvcm1hdCwgdGhlIGxvYWQKPj4gYW5k IGVudHJ5IGhhdmUgdG8gYmUgYWxsd2F5cyBkZWZpbmVkIGZvciBhICJrZXJuZWwiIG9yICJzdGFu ZGFsb25lIi4KPj4gQnV0IEJhcmVib3ggaWdub3JlZCB0aGUgcGFyYW1ldGVycy4gVGhhdCBjaGFu Z2VzIHdpdGggdGhpcyBwYXRjaC4KPj4KPj4gRm9yIGJhY2t3YXJkIGNvbXBhdGliaWxpdHkgdGhl IGRlZmF1bHQgYWRkcmVzcyBpcyBzdG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