diff options
author | NeilBrown <neilb@suse.de> | 2008-10-12 20:55:12 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-10-12 20:55:12 -0400 |
commit | fb4d8c76e56a887b9eee99fbc55fe82b18625d30 (patch) | |
tree | 0ca96887e40db671957b79d493830b9527b04949 /drivers | |
parent | ab5bd5cbc8d4b868378d062eed3d4240930fbb86 (diff) |
md: Remove unnecessary #includes, #defines, and function declarations.
A lot of cruft has gathered over the years. Time to remove it.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/linear.c | 8 | ||||
-rw-r--r-- | drivers/md/md.c | 21 | ||||
-rw-r--r-- | drivers/md/multipath.c | 9 | ||||
-rw-r--r-- | drivers/md/raid0.c | 5 | ||||
-rw-r--r-- | drivers/md/raid5.c | 5 | ||||
-rw-r--r-- | drivers/md/raid6.h | 9 |
6 files changed, 4 insertions, 53 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 09a64b9cbde8..190147c79e79 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
@@ -16,16 +16,8 @@ | |||
16 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 16 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/module.h> | ||
20 | |||
21 | #include <linux/raid/md.h> | ||
22 | #include <linux/slab.h> | ||
23 | #include <linux/raid/linear.h> | 19 | #include <linux/raid/linear.h> |
24 | 20 | ||
25 | #define MAJOR_NR MD_MAJOR | ||
26 | #define MD_DRIVER | ||
27 | #define MD_PERSONALITY | ||
28 | |||
29 | /* | 21 | /* |
30 | * find which device holds a particular offset | 22 | * find which device holds a particular offset |
31 | */ | 23 | */ |
diff --git a/drivers/md/md.c b/drivers/md/md.c index fc33082d5ffd..cd97de5982e8 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -32,31 +32,20 @@ | |||
32 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 32 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/module.h> | ||
36 | #include <linux/kernel.h> | ||
37 | #include <linux/kthread.h> | 35 | #include <linux/kthread.h> |
38 | #include <linux/linkage.h> | ||
39 | #include <linux/raid/md.h> | 36 | #include <linux/raid/md.h> |
40 | #include <linux/raid/bitmap.h> | 37 | #include <linux/raid/bitmap.h> |
41 | #include <linux/sysctl.h> | 38 | #include <linux/sysctl.h> |
42 | #include <linux/buffer_head.h> /* for invalidate_bdev */ | 39 | #include <linux/buffer_head.h> /* for invalidate_bdev */ |
43 | #include <linux/poll.h> | 40 | #include <linux/poll.h> |
44 | #include <linux/mutex.h> | ||
45 | #include <linux/ctype.h> | 41 | #include <linux/ctype.h> |
46 | #include <linux/freezer.h> | 42 | #include <linux/hdreg.h> |
47 | 43 | #include <linux/proc_fs.h> | |
48 | #include <linux/init.h> | 44 | #include <linux/random.h> |
49 | 45 | #include <linux/reboot.h> | |
50 | #include <linux/file.h> | 46 | #include <linux/file.h> |
51 | 47 | ||
52 | #ifdef CONFIG_KMOD | ||
53 | #include <linux/kmod.h> | ||
54 | #endif | ||
55 | |||
56 | #include <asm/unaligned.h> | ||
57 | |||
58 | #define MAJOR_NR MD_MAJOR | 48 | #define MAJOR_NR MD_MAJOR |
59 | #define MD_DRIVER | ||
60 | 49 | ||
61 | /* 63 partitions with the alternate major number (mdp) */ | 50 | /* 63 partitions with the alternate major number (mdp) */ |
62 | #define MdpMinorShift 6 | 51 | #define MdpMinorShift 6 |
@@ -3559,12 +3548,10 @@ static int do_md_run(mddev_t * mddev) | |||
3559 | } | 3548 | } |
3560 | } | 3549 | } |
3561 | 3550 | ||
3562 | #ifdef CONFIG_KMOD | ||
3563 | if (mddev->level != LEVEL_NONE) | 3551 | if (mddev->level != LEVEL_NONE) |
3564 | request_module("md-level-%d", mddev->level); | 3552 | request_module("md-level-%d", mddev->level); |
3565 | else if (mddev->clevel[0]) | 3553 | else if (mddev->clevel[0]) |
3566 | request_module("md-%s", mddev->clevel); | 3554 | request_module("md-%s", mddev->clevel); |
3567 | #endif | ||
3568 | 3555 | ||
3569 | /* | 3556 | /* |
3570 | * Drop all container device buffers, from now on | 3557 | * Drop all container device buffers, from now on |
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 8bb8794129b3..8744014b9d80 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -19,16 +19,7 @@ | |||
19 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/module.h> | ||
23 | #include <linux/slab.h> | ||
24 | #include <linux/spinlock.h> | ||
25 | #include <linux/raid/multipath.h> | 22 | #include <linux/raid/multipath.h> |
26 | #include <linux/buffer_head.h> | ||
27 | #include <asm/atomic.h> | ||
28 | |||
29 | #define MAJOR_NR MD_MAJOR | ||
30 | #define MD_DRIVER | ||
31 | #define MD_PERSONALITY | ||
32 | 23 | ||
33 | #define MAX_WORK_PER_DISK 128 | 24 | #define MAX_WORK_PER_DISK 128 |
34 | 25 | ||
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 53508a8a981d..8ac6488ad0dc 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -18,13 +18,8 @@ | |||
18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/module.h> | ||
22 | #include <linux/raid/raid0.h> | 21 | #include <linux/raid/raid0.h> |
23 | 22 | ||
24 | #define MAJOR_NR MD_MAJOR | ||
25 | #define MD_DRIVER | ||
26 | #define MD_PERSONALITY | ||
27 | |||
28 | static void raid0_unplug(struct request_queue *q) | 23 | static void raid0_unplug(struct request_queue *q) |
29 | { | 24 | { |
30 | mddev_t *mddev = q->queuedata; | 25 | mddev_t *mddev = q->queuedata; |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ae16794bef20..7e654543c97d 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -43,12 +43,7 @@ | |||
43 | * miss any bits. | 43 | * miss any bits. |
44 | */ | 44 | */ |
45 | 45 | ||
46 | #include <linux/module.h> | ||
47 | #include <linux/slab.h> | ||
48 | #include <linux/highmem.h> | ||
49 | #include <linux/bitops.h> | ||
50 | #include <linux/kthread.h> | 46 | #include <linux/kthread.h> |
51 | #include <asm/atomic.h> | ||
52 | #include "raid6.h" | 47 | #include "raid6.h" |
53 | 48 | ||
54 | #include <linux/raid/bitmap.h> | 49 | #include <linux/raid/bitmap.h> |
diff --git a/drivers/md/raid6.h b/drivers/md/raid6.h index 31cbee71365f..98dcde88470e 100644 --- a/drivers/md/raid6.h +++ b/drivers/md/raid6.h | |||
@@ -18,15 +18,6 @@ | |||
18 | /* Set to 1 to use kernel-wide empty_zero_page */ | 18 | /* Set to 1 to use kernel-wide empty_zero_page */ |
19 | #define RAID6_USE_EMPTY_ZERO_PAGE 0 | 19 | #define RAID6_USE_EMPTY_ZERO_PAGE 0 |
20 | 20 | ||
21 | #include <linux/module.h> | ||
22 | #include <linux/stddef.h> | ||
23 | #include <linux/compiler.h> | ||
24 | #include <linux/types.h> | ||
25 | #include <linux/kernel.h> | ||
26 | #include <linux/errno.h> | ||
27 | #include <linux/mempool.h> | ||
28 | #include <linux/list.h> | ||
29 | #include <linux/vmalloc.h> | ||
30 | #include <linux/raid/md.h> | 21 | #include <linux/raid/md.h> |
31 | #include <linux/raid/raid5.h> | 22 | #include <linux/raid/raid5.h> |
32 | 23 | ||