From: Fabien DESSENNE Subject: Re: [PATCH RFC 4/4] crypto: stm32: convert to the new crypto engine API Date: Wed, 6 Dec 2017 11:03:23 +0000 Message-ID: <5835a2df-64d2-1363-15a3-eec4db955d58@st.com> References: <20171129084121.9385-1-clabbe.montjoie@gmail.com> <20171129084121.9385-5-clabbe.montjoie@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: "linux-arm-kernel@lists.infradead.org" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" To: Corentin Labbe , "herbert@gondor.apana.org.au" , Alexandre TORGUE , "arei.gonglei@huawei.com" , "davem@davemloft.net" , "jasowang@redhat.com" , "mcoquelin.stm32@gmail.com" , "mst@redhat.com" , Lionel DEBIEVE Return-path: In-Reply-To: <20171129084121.9385-5-clabbe.montjoie@gmail.com> Content-Language: en-US Content-ID: <53C74EB7E53A664B9ADDA336340EDC82@st.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-crypto.vger.kernel.org SGksDQoNCg0KT24gMjkvMTEvMTcgMDk6NDEsIENvcmVudGluIExhYmJlIHdyb3RlOg0KPiBUaGlz IHBhdGNoIGNvbnZlcnQgdGhlIGRyaXZlciB0byB0aGUgbmV3IGNyeXB0byBlbmdpbmUgQVBJLg0K Pg0KPiBTaWduZWQtb2ZmLWJ5OiBDb3JlbnRpbiBMYWJiZSA8Y2xhYmJlLm1vbnRqb2llQGdtYWls LmNvbT4NCg0KVGVzdGVkLWJ5OiBGYWJpZW4gRGVzc2VubmUgPGZhYmllbi5kZXNzZW5uZUBzdC5j b20+DQoNCj4gLS0tDQo+ICAgZHJpdmVycy9jcnlwdG8vc3RtMzIvc3RtMzItaGFzaC5jIHwgMjIg KysrKysrKysrKysrKysrLS0tLS0tLQ0KPiAgIDEgZmlsZSBjaGFuZ2VkLCAxNSBpbnNlcnRpb25z KCspLCA3IGRlbGV0aW9ucygtKQ0KPg0KPiBkaWZm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