diff mbox series

[v10,3/5] crypto: api - Add crypto_tfm_alg_get_flags() helper inline function

Message ID 20250115162231.83516-4-freude@linux.ibm.com
State New
Headers show
Series [v10,1/5] s390/crypto: Add protected key hmac subfunctions for KMAC | expand

Commit Message

Harald Freudenberger Jan. 15, 2025, 4:22 p.m. UTC
Add a little helper inline function
    crypto_tfm_alg_get_flags()
to the crypto.h header file to retrieve the alg flags.

Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
---
 include/linux/crypto.h | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index b164da5e129e..8b37d381cd97 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -472,6 +472,11 @@  static inline unsigned int crypto_tfm_alg_alignmask(struct crypto_tfm *tfm)
 	return tfm->__crt_alg->cra_alignmask;
 }
 
+static inline u32 crypto_tfm_alg_get_flags(struct crypto_tfm *tfm)
+{
+	return tfm->__crt_alg->cra_flags;
+}
+
 static inline u32 crypto_tfm_get_flags(struct crypto_tfm *tfm)
 {
 	return tfm->crt_flags;