From: =?UTF-8?q?Horia=20Geant=C4=83?= Subject: [PATCH 06/11] crypto: caam - add Queue Interface v2 error codes Date: Mon, 10 Sep 2018 20:15:45 +0300 Message-ID: <20180910171550.5659-7-horia.geanta@nxp.com> References: <20180910171550.5659-1-horia.geanta@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: linux-kernel@vger.kernel.org, Aymen Sghaier , "David S . Miller" , linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org To: Herbert Xu , Stuart Yoder , Laurentiu Tudor , Li Yang , Roy Pledge , Catalin Marinas , Will Deacon Return-path: In-Reply-To: <20180910171550.5659-1-horia.geanta@nxp.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org List-Id: linux-crypto.vger.kernel.org QWRkIHN1cHBvcnQgdG8gdHJhbnNsYXRlIGVycm9yIGNvZGVzIHJldHVybmVkIGJ5IFFJIHYyLCBp LmUuClF1ZXVlIEludGVyZmFjZSBwcmVzZW50IG9uIERhdGFQYXRoIEFjY2VsZXJhdGlvbiBBcmNo aXRlY3R1cmUKdjIgKERQQUEyKS4KClNpZ25lZC1vZmYtYnk6IEhvcmlhIEdlYW50xIMgPGhvcmlh LmdlYW50YUBueHAuY29tPgotLS0KIGRyaXZlcnMvY3J5cHRvL2NhYW0vZXJyb3IuYyB8IDc1ICsr KysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKystLQogZHJpdmVycy9jcnlw dG8vY2FhbS9lcnJvci5oIHwgIDYgKysrLQogZHJpdmVycy9jcnlwdG8vY2FhbS9yZWdzLmggIHwg IDIgKysKIDMgZmlsZXMgY2hhbmdlZCwgNzkgaW5zZXJ0aW9ucygrKSwgNCBkZWxldGlvbnMoLSkK CmRpZmYgLS1naXQgYS9kcml2ZXJzL2NyeXB0by9jYWFtL2Vycm9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