From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-bn3nam01on0132.outbound.protection.outlook.com ([104.47.33.132] helo=NAM01-BN3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fMAGY-00047I-LN for barebox@lists.infradead.org; Fri, 25 May 2018 10:48:12 +0000 From: "Baeuerle, Florian" Date: Fri, 25 May 2018 10:47:54 +0000 Message-ID: <58ea01ed8cdfcade129d7d5b5aa5455066572d75.camel@allegion.com> References: <717577a612f7c48dcb520a970c3ddde7e6b40980.camel@allegion.com> In-Reply-To: <717577a612f7c48dcb520a970c3ddde7e6b40980.camel@allegion.com> Content-Language: en-US Content-ID: 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: Re: [PATCH] commands/of_node: add option to apply changes as fixup To: "barebox@lists.infradead.org" QW0gRnJlaXRhZywgZGVuIDI1LjA1LjIwMTgsIDEwOjQxICswMDAwIHNjaHJpZWIgQmFldWVybGUs IEZsb3JpYW46DQo+IEFuYWxvZ291cyB0byB0aGUgb2ZfcHJvcGVydHkgY29tbWFuZCwgYWRkIGFu IC1mIG9wdGlvbiB0byB0aGUgb2Zfbm9kZQ0KPiBjb21tYW5kLiBUaGlzIG9wdGlvbiBkZWZlcnMg dGhlIGRldmljZSB0cmVlIG1vZGlmaWNhdGlvbiB1bnRpbCBib290DQo+IHRpbWUgYW5kIHRodXMg YXBwbGllcyB0aGUgbW9kaWZpY2F0aW9uIGFzIGEgZml4dXAgb24gdGhlIGxpbnV4IGRldmljZQ0K PiB0cmVlLg0KPiANCj4gU2lnbmVkLW9mZi1ieTogRmxvcmlhbiBCw6R1ZXJsZSA8Zmxvcmlhbi5i YWV1ZXJsZUBhbGxlZ2lvbi5jb20+DQo+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