Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bb37b94c68e7b37eecea8576039ae9396ca07839
Commit:     bb37b94c68e7b37eecea8576039ae9396ca07839
Parent:     0e75f9063f5c55fb0b0b546a7c356f8ec186825e
Author:     Jens Axboe <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 1 10:42:33 2006 +0100
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Fri Dec 1 10:42:33 2006 +0100

    [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 <[EMAIL PROTECTED]>
---
 block/as-iosched.c       |    2 +-
 block/cfq-iosched.c      |    9 ++++-----
 block/deadline-iosched.c |    2 +-
 block/elevator.c         |    4 ++--
 block/noop-iosched.c     |    2 +-
 include/linux/elevator.h |    4 ++--
 6 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/block/as-iosched.c b/block/as-iosched.c
index 50b95e4..0024211 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -1317,7 +1317,7 @@ static void as_exit_queue(elevator_t *e)
 /*
  * 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;
 
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 1d9c3c7..e9019ed 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -1464,8 +1464,7 @@ cfq_update_io_thinktime(struct cfq_data
 }
 
 static void
-cfq_update_io_seektime(struct cfq_data *cfqd, struct cfq_io_context *cic,
-                      struct request *rq)
+cfq_update_io_seektime(struct cfq_io_context *cic, struct request *rq)
 {
        sector_t sdist;
        u64 total;
@@ -1617,7 +1616,7 @@ cfq_rq_enqueued(struct cfq_data *cfqd, s
        }
 
        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);
 
        cic->last_queue = jiffies;
@@ -1770,7 +1769,7 @@ static int cfq_may_queue(request_queue_t
 /*
  * 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);
 
@@ -1951,7 +1950,7 @@ static void cfq_exit_queue(elevator_t *e
        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;
        int i;
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index b7c5b34..6d673e9 100644
--- a/block/deadline-iosched.c
+++ b/block/deadline-iosched.c
@@ -356,7 +356,7 @@ static void deadline_exit_queue(elevator
 /*
  * 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;
 
diff --git a/block/elevator.c b/block/elevator.c
index 8ccd163..c0063f3 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -129,7 +129,7 @@ static struct elevator_type *elevator_ge
 
 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,
@@ -810,7 +810,7 @@ void elv_put_request(request_queue_t *q,
        elevator_t *e = q->elevator;
 
        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)
diff --git a/block/noop-iosched.c b/block/noop-iosched.c
index 79af431..1c3de2b 100644
--- a/block/noop-iosched.c
+++ b/block/noop-iosched.c
@@ -65,7 +65,7 @@ noop_latter_request(request_queue_t *q,
        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;
 
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 2fa9f11..a24931d 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -21,11 +21,11 @@ typedef void (elevator_completed_req_fn)
 typedef int (elevator_may_queue_fn) (request_queue_t *, int);
 
 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_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 *);
 
 struct elevator_ops
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to