@@ -9,16 +9,12 @@
#ifndef _CRYPTO_ACOMP_H
#define _CRYPTO_ACOMP_H
-#include <linux/atomic.h>
#include <linux/args.h>
#include <linux/compiler_types.h>
-#include <linux/container_of.h>
#include <linux/crypto.h>
#include <linux/err.h>
#include <linux/scatterlist.h>
-#include <linux/slab.h>
#include <linux/spinlock_types.h>
-#include <linux/types.h>
/* Set this bit if source is virtual address instead of SG list. */
#define CRYPTO_ACOMP_REQ_SRC_VIRT 0x00000002
@@ -8,11 +8,7 @@
#ifndef _CRYPTO_AEAD_H
#define _CRYPTO_AEAD_H
-#include <linux/atomic.h>
-#include <linux/container_of.h>
#include <linux/crypto.h>
-#include <linux/slab.h>
-#include <linux/types.h>
/**
* DOC: Authenticated Encryption With Associated Data (AEAD) Cipher API
@@ -6,7 +6,6 @@
#ifndef _CRYPTO_AES_H
#define _CRYPTO_AES_H
-#include <linux/types.h>
#include <linux/crypto.h>
#define AES_MIN_KEY_SIZE 16
@@ -8,7 +8,6 @@
#ifndef _CRYPTO_AKCIPHER_H
#define _CRYPTO_AKCIPHER_H
-#include <linux/atomic.h>
#include <linux/crypto.h>
/**
@@ -9,10 +9,7 @@
#include <crypto/utils.h>
#include <linux/align.h>
-#include <linux/cache.h>
#include <linux/crypto.h>
-#include <linux/list.h>
-#include <linux/types.h>
#include <linux/workqueue.h>
/*
@@ -6,7 +6,6 @@
#ifndef _CRYPTO_BLOWFISH_H
#define _CRYPTO_BLOWFISH_H
-#include <linux/types.h>
#include <linux/crypto.h>
#define BF_BLOCK_SIZE 8
@@ -2,7 +2,6 @@
#ifndef _CRYPTO_CAST5_H
#define _CRYPTO_CAST5_H
-#include <linux/types.h>
#include <linux/crypto.h>
#include <crypto/cast_common.h>
@@ -2,7 +2,6 @@
#ifndef _CRYPTO_CAST6_H
#define _CRYPTO_CAST6_H
-#include <linux/types.h>
#include <linux/crypto.h>
#include <crypto/cast_common.h>
@@ -46,12 +46,10 @@
#include <crypto/skcipher.h>
#include <linux/module.h>
#include <linux/crypto.h>
-#include <linux/slab.h>
#include <crypto/internal/rng.h>
#include <crypto/rng.h>
#include <linux/fips.h>
#include <linux/mutex.h>
-#include <linux/list.h>
#include <linux/workqueue.h>
/*
@@ -8,9 +8,7 @@
#ifndef _CRYPTO_HASH_H
#define _CRYPTO_HASH_H
-#include <linux/atomic.h>
#include <linux/crypto.h>
-#include <linux/slab.h>
#include <linux/string.h>
/* Set this bit for virtual address instead of SG list. */
@@ -6,7 +6,6 @@
#ifndef __CRYPTO_INTERNAL_DES_H
#define __CRYPTO_INTERNAL_DES_H
-#include <linux/crypto.h>
#include <linux/fips.h>
#include <crypto/des.h>
#include <crypto/aead.h>
@@ -9,10 +9,7 @@
#ifndef _CRYPTO_KPP_
#define _CRYPTO_KPP_
-#include <linux/atomic.h>
-#include <linux/container_of.h>
#include <linux/crypto.h>
-#include <linux/slab.h>
/**
* struct kpp_request
@@ -8,7 +8,6 @@
#ifndef _CRYPTO_KRB5_H
#define _CRYPTO_KRB5_H
-#include <linux/crypto.h>
#include <crypto/aead.h>
#include <crypto/hash.h>
@@ -9,7 +9,6 @@
#ifndef _CRYPTO_PCRYPT_H
#define _CRYPTO_PCRYPT_H
-#include <linux/container_of.h>
#include <linux/crypto.h>
#include <linux/padata.h>
@@ -6,7 +6,6 @@
#ifndef _CRYPTO_POLY1305_H
#define _CRYPTO_POLY1305_H
-#include <linux/types.h>
#include <linux/crypto.h>
#define POLY1305_BLOCK_SIZE 16
@@ -8,7 +8,6 @@
#ifndef _CRYPTO_POLYVAL_H
#define _CRYPTO_POLYVAL_H
-#include <linux/types.h>
#include <linux/crypto.h>
#define POLYVAL_BLOCK_SIZE 16
@@ -9,8 +9,6 @@
#ifndef _CRYPTO_RNG_H
#define _CRYPTO_RNG_H
-#include <linux/atomic.h>
-#include <linux/container_of.h>
#include <linux/crypto.h>
struct crypto_rng;
@@ -6,7 +6,6 @@
#ifndef _CRYPTO_SERPENT_H
#define _CRYPTO_SERPENT_H
-#include <linux/types.h>
#include <linux/crypto.h>
#define SERPENT_MIN_KEY_SIZE 0
@@ -8,12 +8,8 @@
#ifndef _CRYPTO_SKCIPHER_H
#define _CRYPTO_SKCIPHER_H
-#include <linux/atomic.h>
-#include <linux/container_of.h>
#include <linux/crypto.h>
-#include <linux/slab.h>
#include <linux/string.h>
-#include <linux/types.h>
/* Set this bit if the lskcipher operation is a continuation. */
#define CRYPTO_LSKCIPHER_FLAG_CONT 0x00000001
@@ -9,7 +9,6 @@
#ifndef _CRYPTO_SM4_H
#define _CRYPTO_SM4_H
-#include <linux/types.h>
#include <linux/crypto.h>
#define SM4_KEY_SIZE 16
There are some redundant headers, the include relation is: linux/{list,refcount,slab,types}.h <<== linux/crypto.h linux/container_of.h <<== linux/list.h linux/atomic.h <<== linux/refcount.h linux/cached.h <<== linux/slab.h So it's no need to include <linux/{list,slab,types,container_of,atomic,cached}.h> when already included <linux/crypto.h>. Remove these redundant headers to save some code space. Also remove <linux/crypto.h> when already included <crypto/aead.h>. Signed-off-by: Su Hui <suhui@nfschina.com> --- include/crypto/acompress.h | 4 ---- include/crypto/aead.h | 4 ---- include/crypto/aes.h | 1 - include/crypto/akcipher.h | 1 - include/crypto/algapi.h | 3 --- include/crypto/blowfish.h | 1 - include/crypto/cast5.h | 1 - include/crypto/cast6.h | 1 - include/crypto/drbg.h | 2 -- include/crypto/hash.h | 2 -- include/crypto/internal/des.h | 1 - include/crypto/kpp.h | 3 --- include/crypto/krb5.h | 1 - include/crypto/pcrypt.h | 1 - include/crypto/poly1305.h | 1 - include/crypto/polyval.h | 1 - include/crypto/rng.h | 2 -- include/crypto/serpent.h | 1 - include/crypto/skcipher.h | 4 ---- include/crypto/sm4.h | 1 - 20 files changed, 36 deletions(-)