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.85_2 #1 (Red Hat Linux)) id 1cEwJp-0004Vm-Rd for barebox@lists.infradead.org; Thu, 08 Dec 2016 10:52:55 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 8 Dec 2016 11:52:26 +0100 Message-Id: <20161208105226.27858-2-u.kleine-koenig@pengutronix.de> In-Reply-To: <20161208105226.27858-1-u.kleine-koenig@pengutronix.de> References: <20161208105226.27858-1-u.kleine-koenig@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 2/2] spi: mvebu: improve error reporting To: barebox@lists.infradead.org U2lnbmVkLW9mZi1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRy b25peC5kZT4KLS0tCiBkcml2ZXJzL3NwaS9tdmVidV9zcGkuYyB8IDE0ICsrKysrKysrKysrLS0t CiAxIGZpbGUgY2hhbmdlZCwgMTEgaW5zZXJ0aW9ucygrKSwgMyBkZWxldGlvbnMoLSkKCmRpZmYg LS1naXQgYS9kcml2ZXJzL3NwaS9tdmVidV9zcGkuYyBiL2RyaXZlcnMvc3BpL212ZWJ1X3NwaS5j CmluZGV4IGM1ZDg3MzJlNGY4NC4uMTRhYjM5NjAzY2JiIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Nw aS9tdmVidV9zcGkuYworKysgYi9kcml2ZXJzL3NwaS9tdmVidV9zcGkuYwpAQCAtMjY0LDEzICsy NjQsMTkgQEAgc3RhdGljIGludCBtdmVidV9zcGlfZG9fdHJhbnNmZXIoc3RydWN0IHNwa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