History

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.

Andy Shevchenko committed 4 years ago

Commit 244d22f1 parent 0b62b669 files · +23 −9Browse files

Unified · Split

9 files
  1. include/crypto/aead.h +3 −1
  2. include/crypto/algapi.h +4 −1
  3. include/crypto/blake2b.h +0 −1
  4. include/crypto/blake2s.h +1 −1
  5. include/crypto/cryptd.h +2 −1
  6. include/crypto/engine.h +5 −1
  7. include/crypto/pcrypt.h +1 −1
  8. include/crypto/scatterwalk.h +2 −1
  9. include/crypto/skcipher.h +5 −1
include/crypto/aead.h+3−1
@@ -8,9 +8,10 @@ · 7 unmodified lines
88 #ifndef _CRYPTO_AEAD_H
99 #define _CRYPTO_AEAD_H
1010
11+#include <linux/container_of.h>
1112 #include <linux/crypto.h>
12−#include <linux/kernel.h>
1313 #include <linux/slab.h>
14+#include <linux/types.h>
1415
1516 /**
1617 * DOC: Authenticated Encryption With Associated Data (AEAD) Cipher API
@@ -73,6 +74,7 @@ · 56 unmodified lines
7374 */
7475
7576 struct crypto_aead;
77+struct scatterlist;
7678
7779 /**
7880 * struct aead_request - AEAD request
include/crypto/algapi.h+4−1
@@ -7,9 +7,11 @@ · 6 unmodified lines
77 #ifndef _CRYPTO_ALGAPI_H
88 #define _CRYPTO_ALGAPI_H
99
10+#include <linux/align.h>
1011 #include <linux/crypto.h>
12+#include <linux/kconfig.h>
1113 #include <linux/list.h>
12−#include <linux/kernel.h>
14+#include <linux/types.h>
1315
1416 /*
1517 * Maximum values for blocksize and alignmask, used to allocate
@@ -24,6 +26,7 @@ · 8 unmodified lines
2426 struct crypto_aead;
2527 struct crypto_instance;
2628 struct module;
29+struct notifier_block;
2730 struct rtattr;
2831 struct seq_file;
2932 struct sk_buff;
include/crypto/blake2b.h+0−1
@@ -5,7 +5,6 @@ · 4 unmodified lines
55
66 #include <linux/bug.h>
77 #include <linux/types.h>
8−#include <linux/kernel.h>
98 #include <linux/string.h>
109
1110 enum blake2b_lengths {
include/crypto/blake2s.h+1−1
@@ -7,8 +7,8 @@ · 6 unmodified lines
77 #define _CRYPTO_BLAKE2S_H
88
99 #include <linux/bug.h>
10+#include <linux/kconfig.h>
1011 #include <linux/types.h>
11−#include <linux/kernel.h>
1212 #include <linux/string.h>
1313
1414 enum blake2s_lengths {
include/crypto/cryptd.h+2−1
@@ -13,7 +13,8 @@ · 12 unmodified lines
1313 #ifndef _CRYPTO_CRYPT_H
1414 #define _CRYPTO_CRYPT_H
1515
16−#include <linux/kernel.h>
16+#include <linux/types.h>
17+
1718 #include <crypto/aead.h>
1819 #include <crypto/hash.h>
1920 #include <crypto/skcipher.h>
include/crypto/engine.h+5−1
@@ -9,8 +9,10 @@ · 8 unmodified lines
99
1010 #include <linux/crypto.h>
1111 #include <linux/list.h>
12−#include <linux/kernel.h>
1312 #include <linux/kthread.h>
13+#include <linux/spinlock.h>
14+#include <linux/types.h>
15+
1416 #include <crypto/algapi.h>
1517 #include <crypto/aead.h>
1618 #include <crypto/akcipher.h>
@@ -18,6 +20,8 @@ · 1 unmodified line
1820 #include <crypto/skcipher.h>
1921 #include <crypto/kpp.h>
2022
23+struct device;
24+
2125 #define ENGINE_NAME_LEN 30
2226 /*
2327 * struct crypto_engine - crypto hardware engine
include/crypto/pcrypt.h+1−1
@@ -9,8 +9,8 @@ · 8 unmodified lines
99 #ifndef _CRYPTO_PCRYPT_H
1010 #define _CRYPTO_PCRYPT_H
1111
12+#include <linux/container_of.h>
1213 #include <linux/crypto.h>
13−#include <linux/kernel.h>
1414 #include <linux/padata.h>
1515
1616 struct pcrypt_request {
include/crypto/scatterwalk.h+2−1
@@ -12,8 +12,9 @@ · 11 unmodified lines
1212 #define _CRYPTO_SCATTERWALK_H
1313
1414 #include <crypto/algapi.h>
15+
1516 #include <linux/highmem.h>
16−#include <linux/kernel.h>
17+#include <linux/mm.h>
1718 #include <linux/scatterlist.h>
1819
1920 static inline void scatterwalk_crypto_chain(struct scatterlist *head,
include/crypto/skcipher.h+5−1
@@ -8,9 +8,13 @@ · 7 unmodified lines
88 #ifndef _CRYPTO_SKCIPHER_H
99 #define _CRYPTO_SKCIPHER_H
1010
11+#include <linux/container_of.h>
1112 #include <linux/crypto.h>
12−#include <linux/kernel.h>
1313 #include <linux/slab.h>
14+#include <linux/string.h>
15+#include <linux/types.h>
16+
17+struct scatterlist;
1418
1519 /**
1620 * struct skcipher_request - Symmetric key cipher request

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t