linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] crypto: acomp - search acomp with scomp backend in crypto_has_acomp
@ 2020-04-30  5:10 Barry Song
  2020-05-08  6:05 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Barry Song @ 2020-04-30  5:10 UTC (permalink / raw)
  To: herbert, davem; +Cc: linux-crypto, linuxarm, Barry Song

users may call crypto_has_acomp to confirm the existence of acomp before using
crypto_acomp APIs. Right now, many acomp have scomp backend, for example, lz4,
lzo, deflate etc. crypto_has_acomp will return false for them even though they
support acomp APIs.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
---
 -v2: fixed the mask according to herbert's feedback

 include/crypto/acompress.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/crypto/acompress.h b/include/crypto/acompress.h
index d873f999b334..2b4d2b06ccbd 100644
--- a/include/crypto/acompress.h
+++ b/include/crypto/acompress.h
@@ -157,7 +157,7 @@ static inline int crypto_has_acomp(const char *alg_name, u32 type, u32 mask)
 {
 	type &= ~CRYPTO_ALG_TYPE_MASK;
 	type |= CRYPTO_ALG_TYPE_ACOMPRESS;
-	mask |= CRYPTO_ALG_TYPE_MASK;
+	mask |= CRYPTO_ALG_TYPE_ACOMPRESS_MASK;
 
 	return crypto_has_alg(alg_name, type, mask);
 }
-- 
2.23.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] crypto: acomp - search acomp with scomp backend in crypto_has_acomp
  2020-04-30  5:10 [PATCH v2] crypto: acomp - search acomp with scomp backend in crypto_has_acomp Barry Song
@ 2020-05-08  6:05 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2020-05-08  6:05 UTC (permalink / raw)
  To: Barry Song; +Cc: davem, linux-crypto, linuxarm

On Thu, Apr 30, 2020 at 05:10:18PM +1200, Barry Song wrote:
> users may call crypto_has_acomp to confirm the existence of acomp before using
> crypto_acomp APIs. Right now, many acomp have scomp backend, for example, lz4,
> lzo, deflate etc. crypto_has_acomp will return false for them even though they
> support acomp APIs.
> 
> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
> ---
>  -v2: fixed the mask according to herbert's feedback
> 
>  include/crypto/acompress.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
-- 
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-08  6:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30  5:10 [PATCH v2] crypto: acomp - search acomp with scomp backend in crypto_has_acomp Barry Song
2020-05-08  6:05 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).