Don't include networking in md drivers
PATCH 1/1 Don't include networking in md drivers
Including <net/checksum.h> drags in 60+ network include files we don't need. Change this to <asm/checksum.h> and fix up associated breakage.
Index: drivers/md/linear.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/md/linear.c,v retrieving revision 1.12
md/linear.c +1 -0
@@ -21,6 +21,7 @@#include <linux/raid/md.h> #include <linux/slab.h> #include <linux/bio.h> +#include <linux/init.h> #include <linux/raid/linear.h> #define MAJOR_NR MD_MAJOR
Index: drivers/md/raid0.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/md/raid0.c,v
retrieving revision 1.10
md/raid0.c +1 -0
@@ -21,6 +21,7 @@#include <linux/module.h> #include <linux/raid/raid0.h> #include <linux/bio.h> +#include <linux/init.h> #define MAJOR_NR MD_MAJOR#define MD_DRIVER
Index: drivers/md/raid1.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/md/raid1.c,v
retrieving revision 1.14
md/raid1.c +1 -0
@@ -24,6 +24,7 @@#include <linux/raid/raid1.h> #include <linux/bio.h> +#include <linux/init.h> #define MAJOR_NR MD_MAJOR#define MD_DRIVER
Index: drivers/md/raid5.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/md/raid5.c,v
retrieving revision 1.11
md/raid5.c +1 -0
@@ -22,6 +22,7 @@#include <linux/raid/raid5.h> #include <linux/bio.h> #include <linux/highmem.h> +#include <linux/init.h> #include <asm/bitops.h> #include <asm/atomic.h>
Index: drivers/md/xor.c
===================================================================
RCS file: /var/cvs/linux-2.5/drivers/md/xor.c,v
retrieving revision 1.3
md/xor.c +1 -0
@@ -18,6 +18,7 @@#define BH_TRACE 0#include <linux/module.h> +#include <linux/init.h> #include <linux/raid/md.h> #include <linux/raid/xor.h> #include <asm/xor.h>
Index: include/asm-alpha/checksum.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-alpha/checksum.h,v retrieving revision 1.3
asm-alpha/checksum.h +1 -0
@@ -1,6 +1,7 @@#ifndef _ALPHA_CHECKSUM_H#define _ALPHA_CHECKSUM_H +#include <linux/in6.h> /* * This is a version of ip_compute_csum() optimized for IP headers,
Index: include/asm-arm/checksum.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-arm/checksum.h,v retrieving revision 1.3
asm-arm/checksum.h +2 -0
@@ -9,6 +9,8 @@#ifndef __ASM_ARM_CHECKSUM_H#define __ASM_ARM_CHECKSUM_H +#include <linux/in6.h> +/* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit)
Index: include/asm-m68k/checksum.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-m68k/checksum.h,v retrieving revision 1.4
asm-m68k/checksum.h +2 -0
@@ -1,6 +1,8 @@#ifndef _M68K_CHECKSUM_H#define _M68K_CHECKSUM_H +#include <linux/in6.h> +/* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit)
Index: include/asm-m68knommu/checksum.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-m68knommu/checksum.h,v retrieving revision 1.2
asm-m68knommu/checksum.h +2 -0
@@ -1,6 +1,8 @@#ifndef _M68K_CHECKSUM_H#define _M68K_CHECKSUM_H +#include <linux/in6.h> +/* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit)
Index: include/asm-mips/checksum.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-mips/checksum.h,v retrieving revision 1.3
asm-mips/checksum.h +1 -0
@@ -8,6 +8,7 @@#ifndef _ASM_CHECKSUM_H#define _ASM_CHECKSUM_H +#include <linux/in6.h> #include <asm/uaccess.h> /*
Index: include/asm-mips64/checksum.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-mips64/checksum.h,v retrieving revision 1.3
asm-mips64/checksum.h +1 -0
@@ -10,6 +10,7 @@#ifndef _ASM_CHECKSUM_H#define _ASM_CHECKSUM_H +#include <linux/in6.h> #include <asm/uaccess.h> /*
Index: include/asm-parisc/checksum.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-parisc/checksum.h,v retrieving revision 1.6
asm-parisc/checksum.h +2 -0
@@ -1,6 +1,8 @@#ifndef _PARISC_CHECKSUM_H#define _PARISC_CHECKSUM_H +#include <linux/in6.h> +/* * computes the checksum of a memory block at buff, length len, * and adds in "sum" (32-bit)
Index: include/asm-sh/checksum.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/asm-sh/checksum.h,v retrieving revision 1.3
asm-sh/checksum.h +1 -0
@@ -10,6 +10,7 @@*/ #include <linux/config.h> +#include <linux/in6.h> /* * computes the checksum of a memory block at buff, length len,
Index: include/linux/raid/md.h
===================================================================
RCS file: /var/cvs/linux-2.5/include/linux/raid/md.h,v retrieving revision 1.9
linux/raid/md.h +1 -1
@@ -30,7 +30,7 @@#include <linux/seq_file.h> #include <linux/smp_lock.h> #include <linux/delay.h> -#include <net/checksum.h> +#include <asm/checksum.h> #include <linux/random.h> #include <linux/kernel_stat.h> #include <asm/io.h>
Signature · 3 lines
"It's not Hollywood. War is real, war is primarily not about defeat or victory, it is about death. I've seen thousands and thousands of dead bodies. Do you think I want to have an academic debate on this subject?" -- Robert Fisk