From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gs0O9-0005jX-Ui for barebox@lists.infradead.org; Fri, 08 Feb 2019 07:15:57 +0000 From: =?UTF-8?q?Ulrich=20=C3=96lmann?= Date: Fri, 8 Feb 2019 08:15:23 +0100 Message-Id: <20190208071526.19150-5-u.oelmann@pengutronix.de> In-Reply-To: <20190208071526.19150-1-u.oelmann@pengutronix.de> References: <20190208071526.19150-1-u.oelmann@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 4/7] common: state: harmonize code with dt-utils To: Barebox List T3RoZXIgdGhhbiBpbiBiYXJlYm94IHRoZSBvZmZzZXQgYW5kIHNpemUgb2YgYSBzdGF0ZSdzIGJh Y2tlbmQgZGV2aWNlIGRvIG5vdApuZWNlc3NhcmlseSBlcXVhbCB6ZXJvIGluIExpbnV4IHVzZXJz cGFjZSAoRUVQUk9NcyAmIGJsb2NrIGRldmljZXMpLCBzbyBiYXJlYm94JwphbmQgZHQtdXRpbHMn IHN0YXRlIGNvZGUgZGlmZmVyIGhlcmUuCgpTaWduZWQtb2ZmLWJ5OiBVbHJpY2ggw5ZsbWFubiA8 dS5vZWxtYW5uQHBlbmd1dHJvbml4LmRlPgotLS0KIGNvbW1vbi9zdGF0ZS9zdGF0ZS5jIHwgMTAg KysrKysrKystLQogMSBmaWxlIGNoYW5nZWQsIDggaW5zZXJ0aW9ucygrKSwgMiBkZWxldGlvbnMo LSkKCmRpZmYgLS1naXQgYS9jb21tb24vc3RhdGUvc3RhdGUuYyBiL2NvbW1vbi9zdGF0ZS9zdGF0 ZS5jCm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