linux/kernel.h, linux/mm.h, linux/slab.h are not needed in crypto/*.c
Subsystems (4)
PATCH 1/1 linux/kernel.h, linux/mm.h, linux/slab.h are not needed in crypto/*.c
Less recompilation dependencies.
--- arch/x86/crypto/crc32c-intel.c | 1 - arch/x86/crypto/fpu.c | 1 - crypto/ablkcipher.c | 2 -- crypto/aead.c | 2 -- crypto/ahash.c | 2 -- crypto/algapi.c | 1 - crypto/anubis.c | 1 - crypto/api.c | 2 -- crypto/async_tx/async_memcpy.c | 2 -- crypto/async_tx/async_memset.c | 2 -- crypto/async_tx/async_tx.c | 1 - crypto/async_tx/async_xor.c | 2 -- crypto/authenc.c | 2 -- crypto/blkcipher.c | 2 -- crypto/blowfish.c | 1 - crypto/camellia.c | 1 - crypto/cbc.c | 2 -- crypto/ccm.c | 2 -- crypto/chainiv.c | 1 - crypto/cipher.c | 2 -- crypto/crc32c.c | 1 - crypto/cryptd.c | 2 -- crypto/crypto_null.c | 1 - crypto/ctr.c | 2 -- crypto/cts.c | 2 -- crypto/deflate.c | 2 -- crypto/digest.c | 2 -- crypto/ecb.c | 2 -- crypto/eseqiv.c | 2 -- crypto/gcm.c | 2 -- crypto/gf128mul.c | 2 -- crypto/hash.c | 2 -- crypto/hmac.c | 2 -- crypto/khazad.c | 1 - crypto/lrw.c | 2 -- crypto/md4.c | 1 - crypto/pcbc.c | 2 -- crypto/rmd128.c | 1 - crypto/rmd160.c | 1 - crypto/rmd256.c | 1 - crypto/rmd320.c | 1 - crypto/scatterwalk.c | 2 -- crypto/seqiv.c | 1 - crypto/sha1_generic.c | 1 - crypto/sha256_generic.c | 1 - crypto/sha512_generic.c | 2 -- crypto/shash.c | 2 -- crypto/tcrypt.c | 1 - crypto/tea.c | 1 - crypto/testmgr.c | 1 - crypto/tgr192.c | 1 - crypto/twofish_common.c | 1 - crypto/wp512.c | 1 - crypto/xcbc.c | 3 --- crypto/xts.c | 2 -- crypto/zlib.c | 2 -- 56 files changed, 0 insertions(+), 88 deletions(-)
arch/x86/crypto/crc32c-intel.c +0 -1
@@ -27,7 +27,6 @@#include <linux/init.h> #include <linux/module.h> #include <linux/string.h> -#include <linux/kernel.h> #include <crypto/internal/hash.h> #include <asm/cpufeature.h>
arch/x86/crypto/fpu.c +0 -1
@@ -14,7 +14,6 @@#include <crypto/algapi.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <asm/i387.h>
crypto/ablkcipher.c +0 -2
@@ -16,11 +16,9 @@#include <crypto/internal/skcipher.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/rtnetlink.h> #include <linux/sched.h> -#include <linux/slab.h> #include <linux/seq_file.h> #include "internal.h"
crypto/aead.c +0 -2
@@ -15,10 +15,8 @@#include <crypto/internal/aead.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/rtnetlink.h> -#include <linux/slab.h> #include <linux/seq_file.h> #include "internal.h"
crypto/ahash.c +0 -2
@@ -16,10 +16,8 @@#include <crypto/internal/hash.h> #include <crypto/scatterwalk.h> #include <linux/err.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/sched.h> -#include <linux/slab.h> #include <linux/seq_file.h> #include "internal.h"
crypto/algapi.c +0 -1
@@ -13,7 +13,6 @@#include <linux/err.h> #include <linux/errno.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/list.h> #include <linux/module.h> #include <linux/rtnetlink.h>
crypto/anubis.c +0 -1
@@ -31,7 +31,6 @@#include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <asm/byteorder.h> #include <linux/crypto.h> #include <linux/types.h>
crypto/api.c +0 -2
@@ -17,12 +17,10 @@#include <linux/err.h> #include <linux/errno.h> -#include <linux/kernel.h> #include <linux/kmod.h> #include <linux/module.h> #include <linux/param.h> #include <linux/sched.h> -#include <linux/slab.h> #include <linux/string.h> #include "internal.h"
crypto/async_tx/async_memcpy.c +0 -2
@@ -23,9 +23,7 @@* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * */ -#include <linux/kernel.h> #include <linux/highmem.h> -#include <linux/mm.h> #include <linux/dma-mapping.h> #include <linux/async_tx.h>
crypto/async_tx/async_memset.c +0 -2
@@ -23,9 +23,7 @@* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * */ -#include <linux/kernel.h> #include <linux/interrupt.h> -#include <linux/mm.h> #include <linux/dma-mapping.h> #include <linux/async_tx.h>
crypto/async_tx/async_tx.c +0 -1
@@ -24,7 +24,6 @@* */ #include <linux/rculist.h> -#include <linux/kernel.h> #include <linux/async_tx.h> #ifdef CONFIG_DMA_ENGINE
crypto/async_tx/async_xor.c +0 -2
@@ -23,9 +23,7 @@* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * */ -#include <linux/kernel.h> #include <linux/interrupt.h> -#include <linux/mm.h> #include <linux/dma-mapping.h> #include <linux/raid/xor.h> #include <linux/async_tx.h>
crypto/authenc.c +0 -2
@@ -17,10 +17,8 @@#include <crypto/scatterwalk.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/rtnetlink.h> -#include <linux/slab.h> #include <linux/spinlock.h> struct authenc_instance_ctx {
crypto/blkcipher.c +0 -2
@@ -18,11 +18,9 @@#include <crypto/scatterwalk.h> #include <linux/errno.h> #include <linux/hardirq.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/scatterlist.h> #include <linux/seq_file.h> -#include <linux/slab.h> #include <linux/string.h> #include "internal.h"
crypto/blowfish.c +0 -1
@@ -18,7 +18,6 @@*/ #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <asm/byteorder.h> #include <linux/crypto.h> #include <linux/types.h>
crypto/camellia.c +0 -1
@@ -33,7 +33,6 @@#include <linux/crypto.h> #include <linux/errno.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/bitops.h> #include <asm/unaligned.h>
crypto/cbc.c +0 -2
@@ -13,11 +13,9 @@#include <crypto/algapi.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/log2.h> #include <linux/module.h> #include <linux/scatterlist.h> -#include <linux/slab.h> struct crypto_cbc_ctx {struct crypto_cipher *child;
crypto/ccm.c +0 -2
@@ -15,9 +15,7 @@#include <crypto/scatterwalk.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> #include "internal.h"
crypto/chainiv.c +0 -1
@@ -18,7 +18,6 @@#include <crypto/crypto_wq.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/spinlock.h> #include <linux/string.h>
crypto/cipher.c +0 -2
@@ -13,10 +13,8 @@* */ -#include <linux/kernel.h> #include <linux/crypto.h> #include <linux/errno.h> -#include <linux/slab.h> #include <linux/string.h> #include "internal.h"
crypto/crc32c.c +0 -1
@@ -39,7 +39,6 @@#include <linux/init.h> #include <linux/module.h> #include <linux/string.h> -#include <linux/kernel.h> #define CHKSUM_BLOCK_SIZE 1#define CHKSUM_DIGEST_SIZE 4
crypto/cryptd.c +0 -2
@@ -16,12 +16,10 @@#include <crypto/crypto_wq.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/list.h> #include <linux/module.h> #include <linux/scatterlist.h> #include <linux/sched.h> -#include <linux/slab.h> #define CRYPTD_MAX_CPU_QLEN 100
crypto/crypto_null.c +0 -1
@@ -21,7 +21,6 @@#include <crypto/internal/skcipher.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <linux/string.h> #define NULL_KEY_SIZE 0
crypto/ctr.c +0 -2
@@ -14,11 +14,9 @@#include <crypto/ctr.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/random.h> #include <linux/scatterlist.h> -#include <linux/slab.h> struct crypto_ctr_ctx {struct crypto_cipher *child;
crypto/cts.c +0 -2
@@ -43,12 +43,10 @@#include <crypto/algapi.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/log2.h> #include <linux/module.h> #include <linux/scatterlist.h> #include <crypto/scatterwalk.h> -#include <linux/slab.h> struct crypto_cts_ctx {struct crypto_blkcipher *child;
crypto/deflate.c +0 -2
@@ -30,9 +30,7 @@#include <linux/zlib.h> #include <linux/vmalloc.h> #include <linux/interrupt.h> -#include <linux/mm.h> #include <linux/net.h> -#include <linux/slab.h> #define DEFLATE_DEF_LEVEL Z_DEFAULT_COMPRESSION#define DEFLATE_DEF_WINBITS 11
crypto/digest.c +0 -2
@@ -14,11 +14,9 @@#include <crypto/internal/hash.h> #include <crypto/scatterwalk.h> -#include <linux/mm.h> #include <linux/errno.h> #include <linux/hardirq.h> #include <linux/highmem.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/scatterlist.h>
crypto/ecb.c +0 -2
@@ -13,10 +13,8 @@#include <crypto/algapi.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/scatterlist.h> -#include <linux/slab.h> struct crypto_ecb_ctx {struct crypto_cipher *child;
crypto/eseqiv.c +0 -2
@@ -20,8 +20,6 @@#include <crypto/scatterwalk.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> -#include <linux/mm.h> #include <linux/module.h> #include <linux/scatterlist.h> #include <linux/spinlock.h>
crypto/gcm.c +0 -2
@@ -15,9 +15,7 @@#include <linux/completion.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> struct gcm_instance_ctx {struct crypto_skcipher_spawn ctr;
crypto/gf128mul.c +0 -2
@@ -49,9 +49,7 @@*/ #include <crypto/gf128mul.h> -#include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> #define gf128mul_dat (q) { \ q(0x00), q(0x01), q(0x02), q(0x03), q(0x04), q(0x05), q(0x06), q(0x07),\
crypto/hash.c +0 -2
@@ -11,9 +11,7 @@#include <crypto/internal/hash.h> #include <linux/errno.h> -#include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> #include <linux/seq_file.h> #include "internal.h"
crypto/hmac.c +0 -2
@@ -20,10 +20,8 @@#include <crypto/scatterwalk.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/scatterlist.h> -#include <linux/slab.h> #include <linux/string.h> struct hmac_ctx {
crypto/khazad.c +0 -1
@@ -21,7 +21,6 @@#include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <asm/byteorder.h> #include <linux/crypto.h> #include <linux/types.h>
crypto/lrw.c +0 -2
@@ -19,10 +19,8 @@#include <crypto/algapi.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/scatterlist.h> -#include <linux/slab.h> #include <crypto/b128ops.h> #include <crypto/gf128mul.h>
crypto/md4.c +0 -1
@@ -22,7 +22,6 @@*/ #include <crypto/internal/hash.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/string.h> #include <linux/types.h> #include <asm/byteorder.h>
crypto/pcbc.c +0 -2
@@ -17,10 +17,8 @@#include <crypto/algapi.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/scatterlist.h> -#include <linux/slab.h> struct crypto_pcbc_ctx {struct crypto_cipher *child;
crypto/rmd128.c +0 -1
@@ -16,7 +16,6 @@#include <crypto/internal/hash.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <linux/types.h> #include <asm/byteorder.h>
crypto/rmd160.c +0 -1
@@ -16,7 +16,6 @@#include <crypto/internal/hash.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <linux/types.h> #include <asm/byteorder.h>
crypto/rmd256.c +0 -1
@@ -16,7 +16,6 @@#include <crypto/internal/hash.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <linux/types.h> #include <asm/byteorder.h>
crypto/rmd320.c +0 -1
@@ -16,7 +16,6 @@#include <crypto/internal/hash.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <linux/types.h> #include <asm/byteorder.h>
crypto/scatterwalk.c +0 -2
@@ -15,8 +15,6 @@*/ #include <crypto/scatterwalk.h> -#include <linux/kernel.h> -#include <linux/mm.h> #include <linux/module.h> #include <linux/pagemap.h> #include <linux/highmem.h>
crypto/seqiv.c +0 -1
@@ -18,7 +18,6 @@#include <crypto/rng.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/spinlock.h> #include <linux/string.h>
crypto/sha1_generic.c +0 -1
@@ -19,7 +19,6 @@#include <crypto/internal/hash.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <linux/cryptohash.h> #include <linux/types.h> #include <crypto/sha.h>
crypto/sha256_generic.c +0 -1
@@ -20,7 +20,6 @@#include <crypto/internal/hash.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <linux/types.h> #include <crypto/sha.h> #include <asm/byteorder.h>
crypto/sha512_generic.c +0 -2
@@ -11,9 +11,7 @@* */ #include <crypto/internal/hash.h> -#include <linux/kernel.h> #include <linux/module.h> -#include <linux/mm.h> #include <linux/init.h> #include <linux/crypto.h> #include <linux/types.h>
crypto/shash.c +0 -2
@@ -13,9 +13,7 @@#include <crypto/scatterwalk.h> #include <crypto/internal/hash.h> #include <linux/err.h> -#include <linux/kernel.h> #include <linux/module.h> -#include <linux/slab.h> #include <linux/seq_file.h> #include "internal.h"
crypto/tcrypt.c +0 -1
@@ -19,7 +19,6 @@#include <linux/err.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/slab.h> #include <linux/scatterlist.h> #include <linux/string.h> #include <linux/moduleparam.h>
crypto/tea.c +0 -1
@@ -21,7 +21,6 @@#include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <asm/byteorder.h> #include <linux/crypto.h> #include <linux/types.h>
crypto/testmgr.c +0 -1
@@ -17,7 +17,6 @@#include <linux/err.h> #include <linux/module.h> #include <linux/scatterlist.h> -#include <linux/slab.h> #include <linux/string.h> #include <crypto/rng.h>
crypto/tgr192.c +0 -1
@@ -24,7 +24,6 @@#include <crypto/internal/hash.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <asm/byteorder.h> #include <linux/types.h>
crypto/twofish_common.c +0 -1
@@ -44,7 +44,6 @@#include <linux/crypto.h> #include <linux/errno.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/types.h>
crypto/wp512.c +0 -1
@@ -22,7 +22,6 @@#include <crypto/internal/hash.h> #include <linux/init.h> #include <linux/module.h> -#include <linux/mm.h> #include <asm/byteorder.h> #include <linux/types.h>
crypto/xcbc.c +0 -3
@@ -23,10 +23,7 @@#include <linux/crypto.h> #include <linux/err.h> #include <linux/hardirq.h> -#include <linux/kernel.h> -#include <linux/mm.h> #include <linux/rtnetlink.h> -#include <linux/slab.h> #include <linux/scatterlist.h> static u_int32_t ks[12 ] = {0x01010101 ,0x01010101 ,0x01010101 ,0x01010101 ,
crypto/xts.c +0 -2
@@ -16,10 +16,8 @@#include <crypto/algapi.h> #include <linux/err.h> #include <linux/init.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/scatterlist.h> -#include <linux/slab.h> #include <crypto/b128ops.h> #include <crypto/gf128mul.h>
crypto/zlib.c +0 -2
@@ -27,9 +27,7 @@#include <linux/zlib.h> #include <linux/vmalloc.h> #include <linux/interrupt.h> -#include <linux/mm.h> #include <linux/net.h> -#include <linux/slab.h> #include <crypto/internal/compress.h>
Signature · 1 line
1.6.0.6
Have you compile-tested this on (all?) architectures (note I didn't). But usually some of the includes you removed may be included indirectly on some platforms, but not on all of them.
crypto/ahash.c line 22
Quoted 12 lines · Alexey Mahotkin
crypto/ahash.c +0
-2@@ -16,10 +16,8 @@#include <crypto/internal/hash.h> #include <crypto/scatterwalk.h> #include <linux/err.h> -#include <linux/kernel.h> #include <linux/module.h> #include <linux/sched.h> -#include <linux/slab.h>
ahash.c uses kmalloc(), hence it should include <linux/slab.h>
crypto/algapi.c line 16
Quoted 12 lines
crypto/ahash.c +0
-0#include <linux/seq_file.h> #include "internal.h" crypto/algapi.c +0
-1@@ -13,7 +13,6 @@#include <linux/err.h> #include <linux/errno.h> #include <linux/init.h> -#include <linux/kernel.h>
algapi.c uses printk(), hence it should include <linux/kernel.h>.
crypto/async_tx/async_memset.c line 28
Quoted 11 lines
crypto/async_tx/async_memset.c +0
-2@@ -23,9 +23,7 @@* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. * */ -#include <linux/kernel.h> #include <linux/interrupt.h> -#include <linux/mm.h>
async_memset.c uses page_address(), hence it should include <linux/mm.h>
With kind regards,
Geert Uytterhoeven
Software Architect
Techsoft Centre
Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium
Phone: +32 (0)2 700 8453 Fax: +32 (0)2 700 8622 E-mail: [email protected] Internet: http://www.sony-europe.com/
A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010
--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Herbert Xu
maintainerQuoted 4 lines · Geert Uytterhoeven
Have you compile-tested this on (all?) architectures (note I didn't). But usually some of the includes you removed may be included indirectly on some platforms, but not on all of them.
Indeed, this patch looks completely broken.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt