drivers/md/: make some code static
Subsystems (2)
PATCH 1/1 drivers/md/: make some code static
This patch makes some needlessly global code static.
Signed-off-by Adrian Bunk <[email protected]>
---
drivers/md/dm-hw-handler.c | 2 +- drivers/md/dm-path-selector.c | 2 +- drivers/md/dm-table.c | 2 +- drivers/md/dm-zero.c | 4 ++-- drivers/md/md.c | 14 +++++++------- drivers/md/multipath.c | 3 ++- 6 files changed, 14 insertions(+), 13 deletions(-)
drivers/md/dm-hw-handler.c renamed from drivers/md/dm-hw-handler.c.old +1 -1
@@ -23,7 +23,7 @@static LIST_HEAD (_hw_handlers);static DECLARE_RWSEM (_hwh_lock); -struct hwh_internal *__find_hw_handler_type (const char *name) +static struct hwh_internal *__find_hw_handler_type (const char *name) {struct hwh_internal *hwhi;
drivers/md/dm-path-selector.c renamed from drivers/md/dm-path-selector.c.old +1 -1
@@ -26,7 +26,7 @@static LIST_HEAD (_path_selectors);static DECLARE_RWSEM (_ps_lock); -struct ps_internal *__find_path_selector_type (const char *name) +static struct ps_internal *__find_path_selector_type (const char *name) {struct ps_internal *psi;
drivers/md/dm-table.c renamed from drivers/md/dm-table.c.old +1 -1
@@ -242,7 +242,7 @@ } } -void table_destroy (struct dm_table *t) +static void table_destroy (struct dm_table *t) {unsigned int i;
drivers/md/dm-zero.c renamed from drivers/md/dm-zero.c.old +2 -2
@@ -55,7 +55,7 @@ .map = zero_map, }; -int __init dm_zero_init (void ) +static int __init dm_zero_init (void ) {int r =dm_register_target (&zero_target);
@@ -65,7 +65,7 @@return r; } -void __exit dm_zero_exit(void) +static void __exit dm_zero_exit(void) {int r =dm_unregister_target (&zero_target);
drivers/md/md.c renamed from drivers/md/md.c.old +7 -7
@@ -1046,7 +1046,7 @@ } -struct super_type super_types[] = { +static struct super_type super_types[] = { [0 ] = { .name ="0.90.0" , .owner =THIS_MODULE ,
@@ -2942,7 +2942,7 @@ .revalidate_disk= md_revalidate, }; -int md_thread (void * arg) +static int md_thread (void * arg) {mdk_thread_t *thread = arg;
@@ -3440,7 +3440,7 @@ } } -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 @@ } } -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 @@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 @@ p->proc_fops = &md_seq_fops; } -int __init md_init (void ) +static int __init md_init (void ) {int minor;
drivers/md/multipath.c renamed from drivers/md/multipath.c.old +2 -1
@@ -103,7 +103,8 @@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);