Skip to content

Commit e4fdbca

Browse files
committed
io_uring/io-wq: remove io_wq_for_each_worker() return value
The only use of this helper is to iterate all of the workers, and hence all callers will pass in a func that always returns false to do that. As none of the callers use the return value, get rid of it. Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent e0392a1 commit e4fdbca

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

io_uring/io-wq.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -947,16 +947,13 @@ static bool io_acct_for_each_worker(struct io_wq_acct *acct,
947947
return ret;
948948
}
949949

950-
static bool io_wq_for_each_worker(struct io_wq *wq,
950+
static void io_wq_for_each_worker(struct io_wq *wq,
951951
bool (*func)(struct io_worker *, void *),
952952
void *data)
953953
{
954-
for (int i = 0; i < IO_WQ_ACCT_NR; i++) {
954+
for (int i = 0; i < IO_WQ_ACCT_NR; i++)
955955
if (io_acct_for_each_worker(&wq->acct[i], func, data))
956-
return true;
957-
}
958-
959-
return false;
956+
break;
960957
}
961958

962959
static bool io_wq_worker_wake(struct io_worker *worker, void *data)

0 commit comments

Comments
 (0)