summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2023-02-08 13:58:44 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2023-02-13 18:35:14 +0800
commit255e48eb17684157336bd6dd98d22c1b2d9e3f43 (patch)
treebe544df2392141ee0377b775ddd146b2dfdf45a3 /include
parent234650bd22b4a875a359c83066fd723704aaa7b2 (diff)
downloadlinux-255e48eb17684157336bd6dd98d22c1b2d9e3f43.tar.gz
linux-255e48eb17684157336bd6dd98d22c1b2d9e3f43.tar.bz2
linux-255e48eb17684157336bd6dd98d22c1b2d9e3f43.zip
crypto: api - Use data directly in completion function
This patch does the final flag day conversion of all completion functions which are now all contained in the Crypto API. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include')
-rw-r--r--include/crypto/algapi.h3
-rw-r--r--include/crypto/if_alg.h4
-rw-r--r--include/linux/crypto.h10
3 files changed, 7 insertions, 10 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index 1fd81e74a174..fede394ae2ab 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -305,8 +305,7 @@ enum {
static inline void crypto_request_complete(struct crypto_async_request *req,
int err)
{
- crypto_completion_t complete = req->complete;
- complete(req, err);
+ req->complete(req->data, err);
}
#endif /* _CRYPTO_ALGAPI_H */
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h
index a5db86670bdf..7e76623f9ec3 100644
--- a/include/crypto/if_alg.h
+++ b/include/crypto/if_alg.h
@@ -21,8 +21,6 @@
#define ALG_MAX_PAGES 16
-struct crypto_async_request;
-
struct alg_sock {
/* struct sock must be the first member of struct alg_sock */
struct sock sk;
@@ -235,7 +233,7 @@ int af_alg_sendmsg(struct socket *sock, struct msghdr *msg, size_t size,
ssize_t af_alg_sendpage(struct socket *sock, struct page *page,
int offset, size_t size, int flags);
void af_alg_free_resources(struct af_alg_async_req *areq);
-void af_alg_async_cb(struct crypto_async_request *_req, int err);
+void af_alg_async_cb(void *data, int err);
__poll_t af_alg_poll(struct file *file, struct socket *sock,
poll_table *wait);
struct af_alg_async_req *af_alg_alloc_areq(struct sock *sk,
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index b18f6e669fb1..80f6350fb588 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -176,8 +176,8 @@ struct crypto_async_request;
struct crypto_tfm;
struct crypto_type;
-typedef struct crypto_async_request crypto_completion_data_t;
-typedef void (*crypto_completion_t)(struct crypto_async_request *req, int err);
+typedef void crypto_completion_data_t;
+typedef void (*crypto_completion_t)(void *req, int err);
/**
* DOC: Block Cipher Context Data Structures
@@ -596,12 +596,12 @@ struct crypto_wait {
/*
* Async ops completion helper functioons
*/
-static inline void *crypto_get_completion_data(crypto_completion_data_t *req)
+static inline void *crypto_get_completion_data(void *data)
{
- return req->data;
+ return data;
}
-void crypto_req_done(struct crypto_async_request *req, int err);
+void crypto_req_done(void *req, int err);
static inline int crypto_wait_req(int err, struct crypto_wait *wait)
{