diff mbox series

elevator: Remove argument from elevator_find_get

Message ID 20241011155615.3361143-1-leitao@debian.org (mailing list archive)
State New, archived
Headers show
Series elevator: Remove argument from elevator_find_get | expand

Commit Message

Breno Leitao Oct. 11, 2024, 3:56 p.m. UTC
Commit e4eb37cc0f3ed ("block: Remove elevator required features")
removed the usage of `struct request_queue` from elevator_find_get(),
but didn't removed the argument.

Remove the "struct request_queue *q" argument from elevator_find_get()
given it is useless.

Fixes: e4eb37cc0f3e ("block: Remove elevator required features")
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 block/elevator.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Jens Axboe Oct. 11, 2024, 5:11 p.m. UTC | #1
On Fri, 11 Oct 2024 08:56:15 -0700, Breno Leitao wrote:
> Commit e4eb37cc0f3ed ("block: Remove elevator required features")
> removed the usage of `struct request_queue` from elevator_find_get(),
> but didn't removed the argument.
> 
> Remove the "struct request_queue *q" argument from elevator_find_get()
> given it is useless.
> 
> [...]

Applied, thanks!

[1/1] elevator: Remove argument from elevator_find_get
      commit: ee7ff15bf507d4cf9a2b11b00690dfe6046ad325

Best regards,
Christoph Hellwig Oct. 14, 2024, 5:56 a.m. UTC | #2
On Fri, Oct 11, 2024 at 08:56:15AM -0700, Breno Leitao wrote:
> Commit e4eb37cc0f3ed ("block: Remove elevator required features")
> removed the usage of `struct request_queue` from elevator_find_get(),
> but didn't removed the argument.
> 
> Remove the "struct request_queue *q" argument from elevator_find_get()
> given it is useless.
> 
> Fixes: e4eb37cc0f3e ("block: Remove elevator required features")
> Signed-off-by: Breno Leitao <leitao@debian.org>

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/block/elevator.c b/block/elevator.c
index 4122026b11f1..565807f0b1c7 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -106,8 +106,7 @@  static struct elevator_type *__elevator_find(const char *name)
 	return NULL;
 }
 
-static struct elevator_type *elevator_find_get(struct request_queue *q,
-		const char *name)
+static struct elevator_type *elevator_find_get(const char *name)
 {
 	struct elevator_type *e;
 
@@ -569,7 +568,7 @@  static struct elevator_type *elevator_get_default(struct request_queue *q)
 	    !blk_mq_is_shared_tags(q->tag_set->flags))
 		return NULL;
 
-	return elevator_find_get(q, "mq-deadline");
+	return elevator_find_get("mq-deadline");
 }
 
 /*
@@ -697,7 +696,7 @@  static int elevator_change(struct request_queue *q, const char *elevator_name)
 	if (q->elevator && elevator_match(q->elevator->type, elevator_name))
 		return 0;
 
-	e = elevator_find_get(q, elevator_name);
+	e = elevator_find_get(elevator_name);
 	if (!e)
 		return -EINVAL;
 	ret = elevator_switch(q, e);