Commit 547988ad authored by Jens Axboe's avatar Jens Axboe
Browse files

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: default avatarJens Axboe <axboe@kernel.dk>
parent d13ddd9c
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -2597,12 +2597,10 @@ static unsigned long rings_size(struct io_ring_ctx *ctx, unsigned int sq_entries
#endif

	if (ctx->flags & IORING_SETUP_NO_SQARRAY) {
		if (sq_offset)
		*sq_offset = SIZE_MAX;
		return off;
	}

	if (sq_offset)
	*sq_offset = off;

	sq_array_size = array_size(sizeof(u32), sq_entries);