Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: api - Replace kernel.h with the necessary inclusions

When kernel.h is used in the headers it adds a lot into dependency hell,
especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Andy Shevchenko and committed by
Herbert Xu
244d22ff 0b62b664

+23 -9
+3 -1
include/crypto/aead.h
··· 8 8 #ifndef _CRYPTO_AEAD_H 9 9 #define _CRYPTO_AEAD_H 10 10 11 + #include <linux/container_of.h> 11 12 #include <linux/crypto.h> 12 - #include <linux/kernel.h> 13 13 #include <linux/slab.h> 14 + #include <linux/types.h> 14 15 15 16 /** 16 17 * DOC: Authenticated Encryption With Associated Data (AEAD) Cipher API ··· 74 73 */ 75 74 76 75 struct crypto_aead; 76 + struct scatterlist; 77 77 78 78 /** 79 79 * struct aead_request - AEAD request
+4 -1
include/crypto/algapi.h
··· 7 7 #ifndef _CRYPTO_ALGAPI_H 8 8 #define _CRYPTO_ALGAPI_H 9 9 10 + #include <linux/align.h> 10 11 #include <linux/crypto.h> 12 + #include <linux/kconfig.h> 11 13 #include <linux/list.h> 12 - #include <linux/kernel.h> 14 + #include <linux/types.h> 13 15 14 16 /* 15 17 * Maximum values for blocksize and alignmask, used to allocate ··· 26 24 struct crypto_aead; 27 25 struct crypto_instance; 28 26 struct module; 27 + struct notifier_block; 29 28 struct rtattr; 30 29 struct seq_file; 31 30 struct sk_buff;
-1
include/crypto/blake2b.h
··· 5 5 6 6 #include <linux/bug.h> 7 7 #include <linux/types.h> 8 - #include <linux/kernel.h> 9 8 #include <linux/string.h> 10 9 11 10 enum blake2b_lengths {
+1 -1
include/crypto/blake2s.h
··· 7 7 #define _CRYPTO_BLAKE2S_H 8 8 9 9 #include <linux/bug.h> 10 + #include <linux/kconfig.h> 10 11 #include <linux/types.h> 11 - #include <linux/kernel.h> 12 12 #include <linux/string.h> 13 13 14 14 enum blake2s_lengths {
+2 -1
include/crypto/cryptd.h
··· 13 13 #ifndef _CRYPTO_CRYPT_H 14 14 #define _CRYPTO_CRYPT_H 15 15 16 - #include <linux/kernel.h> 16 + #include <linux/types.h> 17 + 17 18 #include <crypto/aead.h> 18 19 #include <crypto/hash.h> 19 20 #include <crypto/skcipher.h>
+5 -1
include/crypto/engine.h
··· 9 9 10 10 #include <linux/crypto.h> 11 11 #include <linux/list.h> 12 - #include <linux/kernel.h> 13 12 #include <linux/kthread.h> 13 + #include <linux/spinlock.h> 14 + #include <linux/types.h> 15 + 14 16 #include <crypto/algapi.h> 15 17 #include <crypto/aead.h> 16 18 #include <crypto/akcipher.h> 17 19 #include <crypto/hash.h> 18 20 #include <crypto/skcipher.h> 19 21 #include <crypto/kpp.h> 22 + 23 + struct device; 20 24 21 25 #define ENGINE_NAME_LEN 30 22 26 /*
+1 -1
include/crypto/pcrypt.h
··· 9 9 #ifndef _CRYPTO_PCRYPT_H 10 10 #define _CRYPTO_PCRYPT_H 11 11 12 + #include <linux/container_of.h> 12 13 #include <linux/crypto.h> 13 - #include <linux/kernel.h> 14 14 #include <linux/padata.h> 15 15 16 16 struct pcrypt_request {
+2 -1
include/crypto/scatterwalk.h
··· 12 12 #define _CRYPTO_SCATTERWALK_H 13 13 14 14 #include <crypto/algapi.h> 15 + 15 16 #include <linux/highmem.h> 16 - #include <linux/kernel.h> 17 + #include <linux/mm.h> 17 18 #include <linux/scatterlist.h> 18 19 19 20 static inline void scatterwalk_crypto_chain(struct scatterlist *head,
+5 -1
include/crypto/skcipher.h
··· 8 8 #ifndef _CRYPTO_SKCIPHER_H 9 9 #define _CRYPTO_SKCIPHER_H 10 10 11 + #include <linux/container_of.h> 11 12 #include <linux/crypto.h> 12 - #include <linux/kernel.h> 13 13 #include <linux/slab.h> 14 + #include <linux/string.h> 15 + #include <linux/types.h> 16 + 17 + struct scatterlist; 14 18 15 19 /** 16 20 * struct skcipher_request - Symmetric key cipher request