Commit 8fd17374 authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: api - Rename CRYPTO_ALG_REQ_CHAIN to CRYPTO_ALG_REQ_VIRT



As chaining has been removed, all that remains of REQ_CHAIN is
just virtual address support.  Rename it before the reintroduction
of batching creates confusion.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 0efae411
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ int crypto_acomp_compress(struct acomp_req *req)

	if (acomp_req_on_stack(req) && acomp_is_async(tfm))
		return -EAGAIN;
	if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req))
	if (crypto_acomp_req_virt(tfm) || acomp_request_issg(req))
		return crypto_acomp_reqtfm(req)->compress(req);
	return acomp_do_req_chain(req, true);
}
@@ -299,7 +299,7 @@ int crypto_acomp_decompress(struct acomp_req *req)

	if (acomp_req_on_stack(req) && acomp_is_async(tfm))
		return -EAGAIN;
	if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req))
	if (crypto_acomp_req_virt(tfm) || acomp_request_issg(req))
		return crypto_acomp_reqtfm(req)->decompress(req);
	return acomp_do_req_chain(req, false);
}
+3 −3
Original line number Diff line number Diff line
@@ -407,7 +407,7 @@ static int ahash_do_req_chain(struct ahash_request *req,
	u8 *page = NULL;
	int err;

	if (crypto_ahash_req_chain(tfm) ||
	if (crypto_ahash_req_virt(tfm) ||
	    !update || !ahash_request_isvirt(req))
		return op(req);

@@ -550,7 +550,7 @@ int crypto_ahash_finup(struct ahash_request *req)
	if (ahash_req_on_stack(req) && ahash_is_async(tfm))
		return -EAGAIN;
	if (!crypto_ahash_alg(tfm)->finup ||
	    (!crypto_ahash_req_chain(tfm) && ahash_request_isvirt(req)))
	    (!crypto_ahash_req_virt(tfm) && ahash_request_isvirt(req)))
		return ahash_def_finup(req);
	return ahash_do_req_chain(req, crypto_ahash_alg(tfm)->finup);
}
@@ -622,7 +622,7 @@ int crypto_ahash_digest(struct ahash_request *req)
		return shash_ahash_digest(req, prepare_shash_desc(req, tfm));
	if (ahash_req_on_stack(req) && ahash_is_async(tfm))
		return -EAGAIN;
	if (!crypto_ahash_req_chain(tfm) && ahash_request_isvirt(req))
	if (!crypto_ahash_req_virt(tfm) && ahash_request_isvirt(req))
		return ahash_def_digest(req);
	if (crypto_ahash_get_flags(tfm) & CRYPTO_TFM_NEED_KEY)
		return -ENOKEY;
+1 −1
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ static struct acomp_alg acomp = {
	.init			= deflate_init,
	.base.cra_name		= "deflate",
	.base.cra_driver_name	= "deflate-generic",
	.base.cra_flags		= CRYPTO_ALG_REQ_CHAIN,
	.base.cra_flags		= CRYPTO_ALG_REQ_VIRT,
	.base.cra_module	= THIS_MODULE,
};

+1 −1
Original line number Diff line number Diff line
@@ -355,7 +355,7 @@ static void scomp_prepare_alg(struct scomp_alg *alg)

	comp_prepare_alg(&alg->calg);

	base->cra_flags |= CRYPTO_ALG_REQ_CHAIN;
	base->cra_flags |= CRYPTO_ALG_REQ_VIRT;
}

int crypto_register_scomp(struct scomp_alg *alg)
+2 −2
Original line number Diff line number Diff line
@@ -255,9 +255,9 @@ static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm)
	return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK;
}

static inline bool crypto_tfm_req_chain(struct crypto_tfm *tfm)
static inline bool crypto_tfm_req_virt(struct crypto_tfm *tfm)
{
	return tfm->__crt_alg->cra_flags & CRYPTO_ALG_REQ_CHAIN;
	return tfm->__crt_alg->cra_flags & CRYPTO_ALG_REQ_VIRT;
}

static inline u32 crypto_request_flags(struct crypto_async_request *req)
Loading