mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
Jens Axboe
parent
84692a1519
commit
1e93de9205
@@ -53,8 +53,7 @@ static ssize_t io_query_scq(union io_query_data *data)
|
|||||||
return sizeof(*e);
|
return sizeof(*e);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int io_handle_query_entry(struct io_ring_ctx *ctx,
|
static int io_handle_query_entry(union io_query_data *data, void __user *uhdr,
|
||||||
union io_query_data *data, void __user *uhdr,
|
|
||||||
u64 *next_entry)
|
u64 *next_entry)
|
||||||
{
|
{
|
||||||
struct io_uring_query_hdr hdr;
|
struct io_uring_query_hdr hdr;
|
||||||
@@ -107,7 +106,7 @@ out:
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int io_query(struct io_ring_ctx *ctx, void __user *arg, unsigned nr_args)
|
int io_query(void __user *arg, unsigned nr_args)
|
||||||
{
|
{
|
||||||
union io_query_data entry_buffer;
|
union io_query_data entry_buffer;
|
||||||
void __user *uhdr = arg;
|
void __user *uhdr = arg;
|
||||||
@@ -121,7 +120,7 @@ int io_query(struct io_ring_ctx *ctx, void __user *arg, unsigned nr_args)
|
|||||||
while (uhdr) {
|
while (uhdr) {
|
||||||
u64 next_hdr;
|
u64 next_hdr;
|
||||||
|
|
||||||
ret = io_handle_query_entry(ctx, &entry_buffer, uhdr, &next_hdr);
|
ret = io_handle_query_entry(&entry_buffer, uhdr, &next_hdr);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
uhdr = u64_to_user_ptr(next_hdr);
|
uhdr = u64_to_user_ptr(next_hdr);
|
||||||
|
|||||||
@@ -4,6 +4,6 @@
|
|||||||
|
|
||||||
#include <linux/io_uring_types.h>
|
#include <linux/io_uring_types.h>
|
||||||
|
|
||||||
int io_query(struct io_ring_ctx *ctx, void __user *arg, unsigned nr_args);
|
int io_query(void __user *arg, unsigned nr_args);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -813,7 +813,7 @@ static int __io_uring_register(struct io_ring_ctx *ctx, unsigned opcode,
|
|||||||
ret = io_register_mem_region(ctx, arg);
|
ret = io_register_mem_region(ctx, arg);
|
||||||
break;
|
break;
|
||||||
case IORING_REGISTER_QUERY:
|
case IORING_REGISTER_QUERY:
|
||||||
ret = io_query(ctx, arg, nr_args);
|
ret = io_query(arg, nr_args);
|
||||||
break;
|
break;
|
||||||
case IORING_REGISTER_ZCRX_CTRL:
|
case IORING_REGISTER_ZCRX_CTRL:
|
||||||
ret = io_zcrx_ctrl(ctx, arg, nr_args);
|
ret = io_zcrx_ctrl(ctx, arg, nr_args);
|
||||||
@@ -888,7 +888,7 @@ static int io_uring_register_blind(unsigned int opcode, void __user *arg,
|
|||||||
case IORING_REGISTER_SEND_MSG_RING:
|
case IORING_REGISTER_SEND_MSG_RING:
|
||||||
return io_uring_register_send_msg_ring(arg, nr_args);
|
return io_uring_register_send_msg_ring(arg, nr_args);
|
||||||
case IORING_REGISTER_QUERY:
|
case IORING_REGISTER_QUERY:
|
||||||
return io_query(NULL, arg, nr_args);
|
return io_query(arg, nr_args);
|
||||||
}
|
}
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user