Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 547988a

Browse files
committed
io_uring: remove checks for NULL 'sq_offset'
Since the 5.12 kernel release, nobody has been passing NULL as the sq_offset pointer. Remove the checks for it being NULL or not, it will always be valid. Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent d13ddd9 commit 547988a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

io_uring/io_uring.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,13 +2597,11 @@ static unsigned long rings_size(struct io_ring_ctx *ctx, unsigned int sq_entries
25972597
#endif
25982598

25992599
if (ctx->flags & IORING_SETUP_NO_SQARRAY) {
2600-
if (sq_offset)
2601-
*sq_offset = SIZE_MAX;
2600+
*sq_offset = SIZE_MAX;
26022601
return off;
26032602
}
26042603

2605-
if (sq_offset)
2606-
*sq_offset = off;
2604+
*sq_offset = off;
26072605

26082606
sq_array_size = array_size(sizeof(u32), sq_entries);
26092607
if (sq_array_size == SIZE_MAX)

0 commit comments

Comments
 (0)