diff options
author | Adrian Bunk <bunk@kernel.org> | 2007-12-12 12:51:56 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-12-18 02:29:28 -0500 |
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 555cd6bf4ce5..cb5e53b05c7c 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c | |||
@@ -1464,7 +1464,9 @@ static struct elevator_type iosched_as = { | |||
1464 | 1464 | ||
1465 | static int __init as_init(void) | 1465 | static int __init as_init(void) |
1466 | { | 1466 | { |
1467 | return elv_register(&iosched_as); | 1467 | elv_register(&iosched_as); |
1468 | |||
1469 | return 0; | ||
1468 | } | 1470 | } |
1469 | 1471 | ||
1470 | static void __exit as_exit(void) | 1472 | static void __exit as_exit(void) |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 0b4a47905575..13553e015d72 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -2279,8 +2279,6 @@ static struct elevator_type iosched_cfq = { | |||
2279 | 2279 | ||
2280 | static int __init cfq_init(void) | 2280 | static int __init cfq_init(void) |
2281 | { | 2281 | { |
2282 | int ret; | ||
2283 | |||
2284 | /* | 2282 | /* |
2285 | * could be 0 on HZ < 1000 setups | 2283 | * could be 0 on HZ < 1000 setups |
2286 | */ | 2284 | */ |
@@ -2292,11 +2290,9 @@ static int __init cfq_init(void) | |||
2292 | if (cfq_slab_setup()) | 2290 | if (cfq_slab_setup()) |
2293 | return -ENOMEM; | 2291 | return -ENOMEM; |
2294 | 2292 | ||
2295 | ret = elv_register(&iosched_cfq); | 2293 | elv_register(&iosched_cfq); |
2296 | if (ret) | ||
2297 | cfq_slab_kill(); | ||
2298 | 2294 | ||
2299 | return ret; | 2295 | return 0; |
2300 | } | 2296 | } |
2301 | 2297 | ||
2302 | static void __exit cfq_exit(void) | 2298 | static void __exit cfq_exit(void) |
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c index a054eef8dff6..342448c3d2dd 100644 --- a/block/deadline-iosched.c +++ b/block/deadline-iosched.c | |||
@@ -467,7 +467,9 @@ static struct elevator_type iosched_deadline = { | |||
467 | 467 | ||
468 | static int __init deadline_init(void) | 468 | static int __init deadline_init(void) |
469 | { | 469 | { |
470 | return elv_register(&iosched_deadline); | 470 | elv_register(&iosched_deadline); |
471 | |||
472 | return 0; | ||
471 | } | 473 | } |
472 | 474 | ||
473 | static void __exit deadline_exit(void) | 475 | static void __exit deadline_exit(void) |
diff --git a/block/elevator.c b/block/elevator.c index 446aea2a3cfb..e452deb80395 100644 --- a/block/elevator.c +++ b/block/elevator.c | |||
@@ -960,7 +960,7 @@ void elv_unregister_queue(struct request_queue *q) | |||
960 | __elv_unregister_queue(q->elevator); | 960 | __elv_unregister_queue(q->elevator); |
961 | } | 961 | } |
962 | 962 | ||
963 | int elv_register(struct elevator_type *e) | 963 | void elv_register(struct elevator_type *e) |
964 | { | 964 | { |
965 | char *def = ""; | 965 | char *def = ""; |
966 | 966 | ||
@@ -975,7 +975,6 @@ int elv_register(struct elevator_type *e) | |||
975 | def = " (default)"; | 975 | def = " (default)"; |
976 | 976 | ||
977 | printk(KERN_INFO "io scheduler %s registered%s\n", e->elevator_name, def); | 977 | printk(KERN_INFO "io scheduler %s registered%s\n", e->elevator_name, def); |
978 | return 0; | ||
979 | } | 978 | } |
980 | EXPORT_SYMBOL_GPL(elv_register); | 979 | EXPORT_SYMBOL_GPL(elv_register); |
981 | 980 | ||
diff --git a/block/noop-iosched.c b/block/noop-iosched.c index 7563d8aa3944..c23e02969650 100644 --- a/block/noop-iosched.c +++ b/block/noop-iosched.c | |||
@@ -101,7 +101,9 @@ static struct elevator_type elevator_noop = { | |||
101 | 101 | ||
102 | static int __init noop_init(void) | 102 | static int __init noop_init(void) |
103 | { | 103 | { |
104 | return elv_register(&elevator_noop); | 104 | elv_register(&elevator_noop); |
105 | |||
106 | return 0; | ||
105 | } | 107 | } |
106 | 108 | ||
107 | static void __exit noop_exit(void) | 109 | static void __exit noop_exit(void) |