Commit 255e48eb authored by Herbert Xu's avatar Herbert Xu
Browse files

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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 234650bd
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -308,10 +308,9 @@ static int adiantum_finish(struct skcipher_request *req)
	return 0;
}

static void adiantum_streamcipher_done(struct crypto_async_request *areq,
				       int err)
static void adiantum_streamcipher_done(void *data, int err)
{
	struct skcipher_request *req = areq->data;
	struct skcipher_request *req = data;

	if (!err)
		err = adiantum_finish(req);
+3 −3
Original line number Diff line number Diff line
@@ -1186,7 +1186,7 @@ EXPORT_SYMBOL_GPL(af_alg_free_resources);

/**
 * af_alg_async_cb - AIO callback handler
 * @_req: async request info
 * @data: async request completion data
 * @err: if non-zero, error result to be returned via ki_complete();
 *       otherwise return the AIO output length via ki_complete().
 *
@@ -1196,9 +1196,9 @@ EXPORT_SYMBOL_GPL(af_alg_free_resources);
 * The number of bytes to be generated with the AIO operation must be set
 * in areq->outlen before the AIO callback handler is invoked.
 */
void af_alg_async_cb(struct crypto_async_request *_req, int err)
void af_alg_async_cb(void *data, int err)
{
	struct af_alg_async_req *areq = _req->data;
	struct af_alg_async_req *areq = data;
	struct sock *sk = areq->sk;
	struct kiocb *iocb = areq->iocb;
	unsigned int resultlen;
+6 −6
Original line number Diff line number Diff line
@@ -256,9 +256,9 @@ static void ahash_restore_req(struct ahash_request *req, int err)
	kfree_sensitive(subreq);
}

static void ahash_op_unaligned_done(struct crypto_async_request *req, int err)
static void ahash_op_unaligned_done(void *data, int err)
{
	struct ahash_request *areq = req->data;
	struct ahash_request *areq = data;

	if (err == -EINPROGRESS)
		goto out;
@@ -348,9 +348,9 @@ int crypto_ahash_digest(struct ahash_request *req)
}
EXPORT_SYMBOL_GPL(crypto_ahash_digest);

static void ahash_def_finup_done2(struct crypto_async_request *req, int err)
static void ahash_def_finup_done2(void *data, int err)
{
	struct ahash_request *areq = req->data;
	struct ahash_request *areq = data;

	if (err == -EINPROGRESS)
		return;
@@ -378,9 +378,9 @@ static int ahash_def_finup_finish1(struct ahash_request *req, int err)
	return err;
}

static void ahash_def_finup_done1(struct crypto_async_request *req, int err)
static void ahash_def_finup_done1(void *data, int err)
{
	struct ahash_request *areq = req->data;
	struct ahash_request *areq = data;
	struct ahash_request *subreq;

	if (err == -EINPROGRESS)
+2 −2
Original line number Diff line number Diff line
@@ -643,9 +643,9 @@ int crypto_has_alg(const char *name, u32 type, u32 mask)
}
EXPORT_SYMBOL_GPL(crypto_has_alg);

void crypto_req_done(struct crypto_async_request *req, int err)
void crypto_req_done(void *data, int err)
{
	struct crypto_wait *wait = req->data;
	struct crypto_wait *wait = data;

	if (err == -EINPROGRESS)
		return;
+6 −8
Original line number Diff line number Diff line
@@ -109,9 +109,9 @@ static int crypto_authenc_setkey(struct crypto_aead *authenc, const u8 *key,
	return err;
}

static void authenc_geniv_ahash_done(struct crypto_async_request *areq, int err)
static void authenc_geniv_ahash_done(void *data, int err)
{
	struct aead_request *req = areq->data;
	struct aead_request *req = data;
	struct crypto_aead *authenc = crypto_aead_reqtfm(req);
	struct aead_instance *inst = aead_alg_instance(authenc);
	struct authenc_instance_ctx *ictx = aead_instance_ctx(inst);
@@ -160,10 +160,9 @@ static int crypto_authenc_genicv(struct aead_request *req, unsigned int flags)
	return 0;
}

static void crypto_authenc_encrypt_done(struct crypto_async_request *req,
					int err)
static void crypto_authenc_encrypt_done(void *data, int err)
{
	struct aead_request *areq = req->data;
	struct aead_request *areq = data;

	if (err)
		goto out;
@@ -261,10 +260,9 @@ static int crypto_authenc_decrypt_tail(struct aead_request *req,
	return crypto_skcipher_decrypt(skreq);
}

static void authenc_verify_ahash_done(struct crypto_async_request *areq,
				      int err)
static void authenc_verify_ahash_done(void *data, int err)
{
	struct aead_request *req = areq->data;
	struct aead_request *req = data;

	if (err)
		goto out;
Loading