From fcc5e5274bc78ee6509a029673063b91fd262e32 Mon Sep 17 00:00:00 2001 From: Cristian Stoica Date: Fri, 14 Mar 2014 17:08:05 +0200 Subject: crypto: tls - drop redundant callback Cipher completion can be signaled by the base (aead) request. There is no need for another function to do that Change-Id: I6e0bcfdeebfd6d9d3151d9eb9549c98a87e2ccf2 Signed-off-by: Cristian Stoica Reviewed-on: http://git.am.freescale.net:8181/10080 Tested-by: Review Code-CDREVIEW Reviewed-by: Horia Ioan Geanta Neag Reviewed-by: Jose Rivera (cherry picked from commit e91688b30c6132b873752a4d3870e50e47911428) Reviewed-on: http://git.am.freescale.net:8181/10379 Reviewed-by: Mircea Pop Reviewed-by: Alexandru Porosanu diff --git a/crypto/tls.c b/crypto/tls.c index 18cc536..a45574d 100644 --- a/crypto/tls.c +++ b/crypto/tls.c @@ -57,17 +57,6 @@ static void tls_async_op_done(struct crypto_async_request *req, int err) complete(&areq->completion); } -static void tls_request_done(struct crypto_async_request *req, int err) -{ - /* Mark the completion of the TLS request */ - struct aead_request *areq = req->data; - - if (err == -EINPROGRESS) - return; - - aead_request_complete(areq, err); -} - static int crypto_tls_setkey(struct crypto_aead *tls, const u8 *key, unsigned int keylen) { @@ -273,7 +262,7 @@ static int crypto_tls_encrypt(struct aead_request *req) req->iv); /* mark the completion of the whole encryption request */ ablkcipher_request_set_callback(abreq, aead_request_flags(req), - tls_request_done, req); + req->base.complete, req->base.data); /* Apply the cipher transform. The result will be in req->dst */ err = crypto_ablkcipher_encrypt(abreq); -- cgit v0.10.2