From: Adrian Bunk This patch makes some needlessly global code static. Signed-off-by: Adrian Bunk Signed-off-by: Andrew Morton --- drivers/md/md.c | 14 +++++++------- drivers/md/multipath.c | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff -puN drivers/md/md.c~drivers-md-make-some-code-static drivers/md/md.c --- 25/drivers/md/md.c~drivers-md-make-some-code-static 2005-05-04 16:47:57.000000000 -0700 +++ 25-akpm/drivers/md/md.c 2005-05-04 16:47:57.000000000 -0700 @@ -1046,7 +1046,7 @@ static void super_1_sync(mddev_t *mddev, } -struct super_type super_types[] = { +static struct super_type super_types[] = { [0] = { .name = "0.90.0", .owner = THIS_MODULE, @@ -2942,7 +2942,7 @@ static struct block_device_operations md .revalidate_disk= md_revalidate, }; -int md_thread(void * arg) +static int md_thread(void * arg) { mdk_thread_t *thread = arg; @@ -3440,7 +3440,7 @@ void md_write_end(mddev_t *mddev) } } -DECLARE_WAIT_QUEUE_HEAD(resync_wait); +static DECLARE_WAIT_QUEUE_HEAD(resync_wait); #define SYNC_MARKS 10 #define SYNC_MARK_STEP (3*HZ) @@ -3837,8 +3837,8 @@ void md_check_recovery(mddev_t *mddev) } } -int md_notify_reboot(struct notifier_block *this, - unsigned long code, void *x) +static int md_notify_reboot(struct notifier_block *this, + unsigned long code, void *x) { struct list_head *tmp; mddev_t *mddev; @@ -3861,7 +3861,7 @@ int md_notify_reboot(struct notifier_blo return NOTIFY_DONE; } -struct notifier_block md_notifier = { +static struct notifier_block md_notifier = { .notifier_call = md_notify_reboot, .next = NULL, .priority = INT_MAX, /* before any real devices */ @@ -3878,7 +3878,7 @@ static void md_geninit(void) p->proc_fops = &md_seq_fops; } -int __init md_init(void) +static int __init md_init(void) { int minor; diff -puN drivers/md/multipath.c~drivers-md-make-some-code-static drivers/md/multipath.c --- 25/drivers/md/multipath.c~drivers-md-make-some-code-static 2005-05-04 16:47:57.000000000 -0700 +++ 25-akpm/drivers/md/multipath.c 2005-05-04 16:47:57.000000000 -0700 @@ -103,7 +103,8 @@ static void multipath_end_bh_io (struct mempool_free(mp_bh, conf->pool); } -int multipath_end_request(struct bio *bio, unsigned int bytes_done, int error) +static int multipath_end_request(struct bio *bio, unsigned int bytes_done, + int error) { int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); struct multipath_bh * mp_bh = (struct multipath_bh *)(bio->bi_private); _