Skip to content

Commit 1e93de9

Browse files
calebsanderaxboe
authored andcommitted
io_uring/query: drop unused io_handle_query_entry() ctx arg
io_handle_query_entry() doesn't use its struct io_ring_ctx *ctx argument. So remove it from the function and its callers. Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 84692a1 commit 1e93de9

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

io_uring/query.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ static ssize_t io_query_scq(union io_query_data *data)
5353
return sizeof(*e);
5454
}
5555

56-
static int io_handle_query_entry(struct io_ring_ctx *ctx,
57-
union io_query_data *data, void __user *uhdr,
56+
static int io_handle_query_entry(union io_query_data *data, void __user *uhdr,
5857
u64 *next_entry)
5958
{
6059
struct io_uring_query_hdr hdr;
@@ -107,7 +106,7 @@ static int io_handle_query_entry(struct io_ring_ctx *ctx,
107106
return 0;
108107
}
109108

110-
int io_query(struct io_ring_ctx *ctx, void __user *arg, unsigned nr_args)
109+
int io_query(void __user *arg, unsigned nr_args)
111110
{
112111
union io_query_data entry_buffer;
113112
void __user *uhdr = arg;
@@ -121,7 +120,7 @@ int io_query(struct io_ring_ctx *ctx, void __user *arg, unsigned nr_args)
121120
while (uhdr) {
122121
u64 next_hdr;
123122

124-
ret = io_handle_query_entry(ctx, &entry_buffer, uhdr, &next_hdr);
123+
ret = io_handle_query_entry(&entry_buffer, uhdr, &next_hdr);
125124
if (ret)
126125
return ret;
127126
uhdr = u64_to_user_ptr(next_hdr);

io_uring/query.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
#include <linux/io_uring_types.h>
66

7-
int io_query(struct io_ring_ctx *ctx, void __user *arg, unsigned nr_args);
7+
int io_query(void __user *arg, unsigned nr_args);
88

99
#endif

io_uring/register.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ static int __io_uring_register(struct io_ring_ctx *ctx, unsigned opcode,
813813
ret = io_register_mem_region(ctx, arg);
814814
break;
815815
case IORING_REGISTER_QUERY:
816-
ret = io_query(ctx, arg, nr_args);
816+
ret = io_query(arg, nr_args);
817817
break;
818818
case IORING_REGISTER_ZCRX_CTRL:
819819
ret = io_zcrx_ctrl(ctx, arg, nr_args);
@@ -888,7 +888,7 @@ static int io_uring_register_blind(unsigned int opcode, void __user *arg,
888888
case IORING_REGISTER_SEND_MSG_RING:
889889
return io_uring_register_send_msg_ring(arg, nr_args);
890890
case IORING_REGISTER_QUERY:
891-
return io_query(NULL, arg, nr_args);
891+
return io_query(arg, nr_args);
892892
}
893893
return -EINVAL;
894894
}

0 commit comments

Comments
 (0)