Skip to content

Commit

Permalink
io_uring: rename "min" arg in io_iopoll_check()
Browse files Browse the repository at this point in the history
Don't name arguments "min", it shadows the namesake function.
min_events is also more consistent.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f52ce9d88d3bca5732a218b0da14924aa6968909.1742829388.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Pavel Begunkov authored and Jens Axboe committed Mar 25, 2025
1 parent 4c76de4 commit d73acd7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions io_uring/io_uring.c
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ static __cold void io_iopoll_try_reap_events(struct io_ring_ctx *ctx)
mutex_unlock(&ctx->uring_lock);
}

static int io_iopoll_check(struct io_ring_ctx *ctx, long min)
static int io_iopoll_check(struct io_ring_ctx *ctx, long min_events)
{
unsigned int nr_events = 0;
unsigned long check_cq;
Expand Down Expand Up @@ -1551,7 +1551,7 @@ static int io_iopoll_check(struct io_ring_ctx *ctx, long min)
io_task_work_pending(ctx)) {
u32 tail = ctx->cached_cq_tail;

(void) io_run_local_work_locked(ctx, min);
(void) io_run_local_work_locked(ctx, min_events);

if (task_work_pending(current) ||
wq_list_empty(&ctx->iopoll_list)) {
Expand All @@ -1564,7 +1564,7 @@ static int io_iopoll_check(struct io_ring_ctx *ctx, long min)
wq_list_empty(&ctx->iopoll_list))
break;
}
ret = io_do_iopoll(ctx, !min);
ret = io_do_iopoll(ctx, !min_events);
if (unlikely(ret < 0))
return ret;

Expand All @@ -1574,7 +1574,7 @@ static int io_iopoll_check(struct io_ring_ctx *ctx, long min)
break;

nr_events += ret;
} while (nr_events < min);
} while (nr_events < min_events);

return 0;
}
Expand Down

0 comments on commit d73acd7

Please sign in to comment.