diff options
author | Adrian Bunk <bunk@kernel.org> | 2007-12-12 18:51:56 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-12-18 08:29:28 +0100 |
commit | 2fdd82bd8852ec8ebad5c69c45138da25c6f9273 (patch) | |
tree | ff701ec0a8909fa50b79763a49a4eaada5aa759e /block | |
parent | 49565124b13bb16607e7f8fc8fb1d9c5c355a1a3 (diff) |
block: let elv_register() return void
elv_register() always returns 0, and there isn't anything it does where
it should return an error (the only error condition is so grave that
it's handled with a BUG_ON).
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/as-iosched.c | 4 | ||||
-rw-r--r-- | block/cfq-iosched.c | 8 | ||||
-rw-r--r-- | block/deadline-iosched.c | 4 | ||||
-rw-r--r-- | block/elevator.c | 3 | ||||
-rw-r--r-- | block/noop-iosched.c | 4 |
5 files changed, 12 insertions, 11 deletions
diff --git a/block/as-iosched.c b/block/as-iosched.c index 555cd6bf4ce..cb5e53b05c7 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c @@ -1464,7 +1464,9 @@ static struct elevator_type iosched_as = { static int __init as_init(void) { - return elv_register(&iosched_as); + elv_register(&iosched_as); + + return 0; } static void __exit as_exit(void) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 0b4a4790557..13553e015d7 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -2279,8 +2279,6 @@ static struct elevator_type iosched_cfq = { static int __init cfq_init(void) { - int ret; - /* * could be 0 on HZ < 1000 setups */ @@ -2292,11 +2290,9 @@ static int __init cfq_init(void) if (cfq_slab_setup()) return -ENOMEM; - ret = elv_register(&iosched_cfq); - if (ret) - cfq_slab_kill(); + elv_register(&iosched_cfq); - return ret; + return 0; } static void __exit cfq_exit(void) diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c index a054eef8dff..342448c3d2d 100644 --- a/block/deadline-iosched.c +++ b/block/deadline-iosched.c @@ -467,7 +467,9 @@ static struct elevator_type iosched_deadline = { static int __init deadline_init(void) { - return elv_register(&iosched_deadline); + elv_register(&iosched_deadline); + + return 0; } static void __exit deadline_exit(void) diff --git a/block/elevator.c b/block/elevator.c index 446aea2a3cf..e452deb8039 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -960,7 +960,7 @@ void elv_unregister_queue(struct request_queue *q) __elv_unregister_queue(q->elevator); } -int elv_register(struct elevator_type *e) +void elv_register(struct elevator_type *e) { char *def = ""; @@ -975,7 +975,6 @@ int elv_register(struct elevator_type *e) def = " (default)"; printk(KERN_INFO "io scheduler %s registered%s\n", e->elevator_name, def); - return 0; } EXPORT_SYMBOL_GPL(elv_register); diff --git a/block/noop-iosched.c b/block/noop-iosched.c index 7563d8aa394..c23e0296965 100644 --- a/block/noop-iosched.c +++ b/block/noop-iosched.c @@ -101,7 +101,9 @@ static struct elevator_type elevator_noop = { static int __init noop_init(void) { - return elv_register(&elevator_noop); + elv_register(&elevator_noop); + + return 0; } static void __exit noop_exit(void) |