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

Kanchana P Sridhar posted 19 patches 9 months, 2 weeks ago
There is a newer version of this series
[PATCH v9 02/19] crypto: acomp - Reinstate non-chained crypto_acomp_[de]compress().
Posted by Kanchana P Sridhar 9 months, 2 weeks 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 kernel test robot 9 months, 2 weeks ago
Hi Kanchana,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 2c01d9f3c61101355afde90dc5c0b39d9a772ef3]

url:    https://github.com/intel-lab-lkp/linux/commits/Kanchana-P-Sridhar/crypto-acomp-Remove-request-chaining/20250501-045602
base:   2c01d9f3c61101355afde90dc5c0b39d9a772ef3
patch link:    https://lore.kernel.org/r/20250430205305.22844-3-kanchana.p.sridhar%40intel.com
patch subject: [PATCH v9 02/19] crypto: acomp - Reinstate non-chained crypto_acomp_[de]compress().
config: arc-randconfig-001-20250501 (https://download.01.org/0day-ci/archive/20250501/202505010736.dy4ElGuu-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250501/202505010736.dy4ElGuu-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505010736.dy4ElGuu-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> crypto/acompress.c:298:12: warning: 'acomp_do_req_chain' defined but not used [-Wunused-function]
     298 | static int acomp_do_req_chain(struct acomp_req *req, bool comp)
         |            ^~~~~~~~~~~~~~~~~~


vim +/acomp_do_req_chain +298 crypto/acompress.c

b67a026003725a5 Herbert Xu         2025-03-09  297  
1a66016d1faca1e Kanchana P Sridhar 2025-04-30 @298  static int acomp_do_req_chain(struct acomp_req *req, bool comp)
b67a026003725a5 Herbert Xu         2025-03-09  299  {
b67a026003725a5 Herbert Xu         2025-03-09  300  	int err;
b67a026003725a5 Herbert Xu         2025-03-09  301  
b67a026003725a5 Herbert Xu         2025-03-09  302  	acomp_save_req(req, acomp_reqchain_done);
b67a026003725a5 Herbert Xu         2025-03-09  303  
1a66016d1faca1e Kanchana P Sridhar 2025-04-30  304  	err = acomp_do_one_req(req, comp);
b67a026003725a5 Herbert Xu         2025-03-09  305  	if (err == -EBUSY || err == -EINPROGRESS)
1a66016d1faca1e Kanchana P Sridhar 2025-04-30  306  		return err;
b67a026003725a5 Herbert Xu         2025-03-09  307  
1a66016d1faca1e Kanchana P Sridhar 2025-04-30  308  	return acomp_reqchain_finish(req, err);
b67a026003725a5 Herbert Xu         2025-03-09  309  }
b67a026003725a5 Herbert Xu         2025-03-09  310  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki