From: Herbert Xu Date: Tue, 25 Feb 2025 05:03:26 +0000 (+0800) Subject: crypto: api - Move struct crypto_type into internal.h X-Git-Tag: v6.15-rc1~118^2~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c3e054dbdb08fef653ea3ef9e6dca449a214c976;p=thirdparty%2Fkernel%2Flinux.git crypto: api - Move struct crypto_type into internal.h Move the definition of struct crypto_type into internal.h as it is only used by API implementors and not algorithm implementors. Signed-off-by: Herbert Xu --- diff --git a/crypto/internal.h b/crypto/internal.h index 46b661be0f90f..08d43b40e7db1 100644 --- a/crypto/internal.h +++ b/crypto/internal.h @@ -33,6 +33,20 @@ struct crypto_larval { bool test_started; }; +struct crypto_type { + unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask); + unsigned int (*extsize)(struct crypto_alg *alg); + int (*init_tfm)(struct crypto_tfm *tfm); + void (*show)(struct seq_file *m, struct crypto_alg *alg); + int (*report)(struct sk_buff *skb, struct crypto_alg *alg); + void (*free)(struct crypto_instance *inst); + + unsigned int type; + unsigned int maskclear; + unsigned int maskset; + unsigned int tfmsize; +}; + enum { CRYPTOA_UNSPEC, CRYPTOA_ALG, diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h index 11065978d3607..94989b2e1350f 100644 --- a/include/crypto/algapi.h +++ b/include/crypto/algapi.h @@ -55,20 +55,6 @@ struct scatterlist; struct seq_file; struct sk_buff; -struct crypto_type { - unsigned int (*ctxsize)(struct crypto_alg *alg, u32 type, u32 mask); - unsigned int (*extsize)(struct crypto_alg *alg); - int (*init_tfm)(struct crypto_tfm *tfm); - void (*show)(struct seq_file *m, struct crypto_alg *alg); - int (*report)(struct sk_buff *skb, struct crypto_alg *alg); - void (*free)(struct crypto_instance *inst); - - unsigned int type; - unsigned int maskclear; - unsigned int maskset; - unsigned int tfmsize; -}; - struct crypto_instance { struct crypto_alg alg;