mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 14:32:23 +00:00
[BLOCK] Cleanup unused variable passing
- ->init_queue() does not need the elevator passed in - ->put_request() is a hot path and need not have the queue passed in - cfq_update_io_seektime() does not need cfqd passed in Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
0e75f9063f
commit
bb37b94c68
@ -1317,7 +1317,7 @@ static void as_exit_queue(elevator_t *e)
|
|||||||
/*
|
/*
|
||||||
* initialize elevator private data (as_data).
|
* initialize elevator private data (as_data).
|
||||||
*/
|
*/
|
||||||
static void *as_init_queue(request_queue_t *q, elevator_t *e)
|
static void *as_init_queue(request_queue_t *q)
|
||||||
{
|
{
|
||||||
struct as_data *ad;
|
struct as_data *ad;
|
||||||
|
|
||||||
|
@ -1464,8 +1464,7 @@ cfq_update_io_thinktime(struct cfq_data *cfqd, struct cfq_io_context *cic)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cfq_update_io_seektime(struct cfq_data *cfqd, struct cfq_io_context *cic,
|
cfq_update_io_seektime(struct cfq_io_context *cic, struct request *rq)
|
||||||
struct request *rq)
|
|
||||||
{
|
{
|
||||||
sector_t sdist;
|
sector_t sdist;
|
||||||
u64 total;
|
u64 total;
|
||||||
@ -1617,7 +1616,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq,
|
|||||||
}
|
}
|
||||||
|
|
||||||
cfq_update_io_thinktime(cfqd, cic);
|
cfq_update_io_thinktime(cfqd, cic);
|
||||||
cfq_update_io_seektime(cfqd, cic, rq);
|
cfq_update_io_seektime(cic, rq);
|
||||||
cfq_update_idle_window(cfqd, cfqq, cic);
|
cfq_update_idle_window(cfqd, cfqq, cic);
|
||||||
|
|
||||||
cic->last_queue = jiffies;
|
cic->last_queue = jiffies;
|
||||||
@ -1770,7 +1769,7 @@ static int cfq_may_queue(request_queue_t *q, int rw)
|
|||||||
/*
|
/*
|
||||||
* queue lock held here
|
* queue lock held here
|
||||||
*/
|
*/
|
||||||
static void cfq_put_request(request_queue_t *q, struct request *rq)
|
static void cfq_put_request(struct request *rq)
|
||||||
{
|
{
|
||||||
struct cfq_queue *cfqq = RQ_CFQQ(rq);
|
struct cfq_queue *cfqq = RQ_CFQQ(rq);
|
||||||
|
|
||||||
@ -1951,7 +1950,7 @@ static void cfq_exit_queue(elevator_t *e)
|
|||||||
kfree(cfqd);
|
kfree(cfqd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *cfq_init_queue(request_queue_t *q, elevator_t *e)
|
static void *cfq_init_queue(request_queue_t *q)
|
||||||
{
|
{
|
||||||
struct cfq_data *cfqd;
|
struct cfq_data *cfqd;
|
||||||
int i;
|
int i;
|
||||||
|
@ -356,7 +356,7 @@ static void deadline_exit_queue(elevator_t *e)
|
|||||||
/*
|
/*
|
||||||
* initialize elevator private data (deadline_data).
|
* initialize elevator private data (deadline_data).
|
||||||
*/
|
*/
|
||||||
static void *deadline_init_queue(request_queue_t *q, elevator_t *e)
|
static void *deadline_init_queue(request_queue_t *q)
|
||||||
{
|
{
|
||||||
struct deadline_data *dd;
|
struct deadline_data *dd;
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ static struct elevator_type *elevator_get(const char *name)
|
|||||||
|
|
||||||
static void *elevator_init_queue(request_queue_t *q, struct elevator_queue *eq)
|
static void *elevator_init_queue(request_queue_t *q, struct elevator_queue *eq)
|
||||||
{
|
{
|
||||||
return eq->ops->elevator_init_fn(q, eq);
|
return eq->ops->elevator_init_fn(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void elevator_attach(request_queue_t *q, struct elevator_queue *eq,
|
static void elevator_attach(request_queue_t *q, struct elevator_queue *eq,
|
||||||
@ -810,7 +810,7 @@ void elv_put_request(request_queue_t *q, struct request *rq)
|
|||||||
elevator_t *e = q->elevator;
|
elevator_t *e = q->elevator;
|
||||||
|
|
||||||
if (e->ops->elevator_put_req_fn)
|
if (e->ops->elevator_put_req_fn)
|
||||||
e->ops->elevator_put_req_fn(q, rq);
|
e->ops->elevator_put_req_fn(rq);
|
||||||
}
|
}
|
||||||
|
|
||||||
int elv_may_queue(request_queue_t *q, int rw)
|
int elv_may_queue(request_queue_t *q, int rw)
|
||||||
|
@ -65,7 +65,7 @@ noop_latter_request(request_queue_t *q, struct request *rq)
|
|||||||
return list_entry(rq->queuelist.next, struct request, queuelist);
|
return list_entry(rq->queuelist.next, struct request, queuelist);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *noop_init_queue(request_queue_t *q, elevator_t *e)
|
static void *noop_init_queue(request_queue_t *q)
|
||||||
{
|
{
|
||||||
struct noop_data *nd;
|
struct noop_data *nd;
|
||||||
|
|
||||||
|
@ -21,11 +21,11 @@ typedef void (elevator_completed_req_fn) (request_queue_t *, struct request *);
|
|||||||
typedef int (elevator_may_queue_fn) (request_queue_t *, int);
|
typedef int (elevator_may_queue_fn) (request_queue_t *, int);
|
||||||
|
|
||||||
typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t);
|
typedef int (elevator_set_req_fn) (request_queue_t *, struct request *, gfp_t);
|
||||||
typedef void (elevator_put_req_fn) (request_queue_t *, struct request *);
|
typedef void (elevator_put_req_fn) (struct request *);
|
||||||
typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
|
typedef void (elevator_activate_req_fn) (request_queue_t *, struct request *);
|
||||||
typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
|
typedef void (elevator_deactivate_req_fn) (request_queue_t *, struct request *);
|
||||||
|
|
||||||
typedef void *(elevator_init_fn) (request_queue_t *, elevator_t *);
|
typedef void *(elevator_init_fn) (request_queue_t *);
|
||||||
typedef void (elevator_exit_fn) (elevator_t *);
|
typedef void (elevator_exit_fn) (elevator_t *);
|
||||||
|
|
||||||
struct elevator_ops
|
struct elevator_ops
|
||||||
|
Loading…
Reference in New Issue
Block a user