[PATCH v9 02/19] crypto: acomp - Reinstate non-chained crypto_acomp_[de]compress().

Kanchana P Sridhar posted 19 patches 9 months ago
[PATCH v9 02/19] crypto: acomp - Reinstate non-chained crypto_acomp_[de]compress().
Posted by Kanchana P Sridhar 9 months ago
This reverts the request chaining implementations of
crypto_acomp_[de]compress() introduced in commit b67a02600372
("crypto: acomp - Add request chaining and virtual addresses") since
request chaining has been removed from acomp subsequently in commit
64929fe8c0a4 ("crypto: acomp - Remove request chaining").

This patch restores the implementations of crypto_acomp_[de]compress()
from prior to commit b67a02600372.

Signed-off-by: Kanchana P Sridhar <kanchana.p.sridhar@intel.com>
---
 crypto/acompress.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/crypto/acompress.c b/crypto/acompress.c
index 82fb3c04e68f..d08e0fe8cd9e 100644
--- a/crypto/acompress.c
+++ b/crypto/acompress.c
@@ -310,21 +310,13 @@ static int acomp_do_req_chain(struct acomp_req *req, bool comp)
 
 int crypto_acomp_compress(struct acomp_req *req)
 {
-	struct crypto_acomp *tfm = crypto_acomp_reqtfm(req);
-
-	if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req))
-		crypto_acomp_reqtfm(req)->compress(req);
-	return acomp_do_req_chain(req, true);
+	return crypto_acomp_reqtfm(req)->compress(req);
 }
 EXPORT_SYMBOL_GPL(crypto_acomp_compress);
 
 int crypto_acomp_decompress(struct acomp_req *req)
 {
-	struct crypto_acomp *tfm = crypto_acomp_reqtfm(req);
-
-	if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req))
-		crypto_acomp_reqtfm(req)->decompress(req);
-	return acomp_do_req_chain(req, false);
+	return crypto_acomp_reqtfm(req)->decompress(req);
 }
 EXPORT_SYMBOL_GPL(crypto_acomp_decompress);
 
-- 
2.27.0
Re: [PATCH v9 02/19] crypto: acomp - Reinstate non-chained crypto_acomp_[de]compress().
Posted by Herbert Xu 9 months ago
On Thu, May 08, 2025 at 12:41:17PM -0700, Kanchana P Sridhar wrote:
>
> diff --git a/crypto/acompress.c b/crypto/acompress.c
> index 82fb3c04e68f..d08e0fe8cd9e 100644
> --- a/crypto/acompress.c
> +++ b/crypto/acompress.c
> @@ -310,21 +310,13 @@ static int acomp_do_req_chain(struct acomp_req *req, bool comp)
>  
>  int crypto_acomp_compress(struct acomp_req *req)
>  {
> -	struct crypto_acomp *tfm = crypto_acomp_reqtfm(req);
> -
> -	if (crypto_acomp_req_chain(tfm) || acomp_request_issg(req))
> -		crypto_acomp_reqtfm(req)->compress(req);
> -	return acomp_do_req_chain(req, true);
> +	return crypto_acomp_reqtfm(req)->compress(req);

That's not right.  Request chaining has already been removed.
What remains is linear address support which you've just removed
with this patch.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt