Skip to content

Commit ddb7253

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: remove the always unused name argument to elevator_init
Reported-by: Damien Le Moal <Damien.LeMoal@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Tested-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent a8a275c commit ddb7253

4 files changed

Lines changed: 5 additions & 11 deletions

File tree

block/blk-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1179,7 +1179,7 @@ int blk_init_allocated_queue(struct request_queue *q)
11791179
mutex_lock(&q->sysfs_lock);
11801180

11811181
/* init elevator */
1182-
if (elevator_init(q, NULL)) {
1182+
if (elevator_init(q)) {
11831183
mutex_unlock(&q->sysfs_lock);
11841184
goto out_exit_flush_rq;
11851185
}

block/blk-mq-sched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ int blk_mq_sched_init(struct request_queue *q)
653653
int ret;
654654

655655
mutex_lock(&q->sysfs_lock);
656-
ret = elevator_init(q, NULL);
656+
ret = elevator_init(q);
657657
mutex_unlock(&q->sysfs_lock);
658658

659659
return ret;

block/blk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ static inline void elv_deactivate_rq(struct request_queue *q, struct request *rq
231231
e->type->ops.sq.elevator_deactivate_req_fn(q, rq);
232232
}
233233

234-
int elevator_init(struct request_queue *, char *);
234+
int elevator_init(struct request_queue *);
235235
void elevator_exit(struct request_queue *, struct elevator_queue *);
236236
int elv_register_queue(struct request_queue *q);
237237
void elv_unregister_queue(struct request_queue *q);

block/elevator.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ static void elevator_release(struct kobject *kobj)
199199
kfree(e);
200200
}
201201

202-
int elevator_init(struct request_queue *q, char *name)
202+
int elevator_init(struct request_queue *q)
203203
{
204204
struct elevator_type *e = NULL;
205205
int err;
@@ -213,19 +213,13 @@ int elevator_init(struct request_queue *q, char *name)
213213
if (unlikely(q->elevator))
214214
return 0;
215215

216-
if (name) {
217-
e = elevator_get(q, name, true);
218-
if (!e)
219-
return -EINVAL;
220-
}
221-
222216
/*
223217
* Use the default elevator specified by config boot param for
224218
* non-mq devices, or by config option. Don't try to load modules
225219
* as we could be running off async and request_module() isn't
226220
* allowed from async.
227221
*/
228-
if (!e && !q->mq_ops && *chosen_elevator) {
222+
if (!q->mq_ops && *chosen_elevator) {
229223
e = elevator_get(q, chosen_elevator, false);
230224
if (!e)
231225
printk(KERN_ERR "I/O scheduler %s not found\n",

0 commit comments

Comments
 (0)