summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-05-22 11:13:44 -0600
committerJens Axboe <axboe@kernel.dk>2024-05-22 11:13:44 -0600
commit547988ad0f9661cd9632bdebd63cf38e008b55b2 (patch)
treea11c8034c0ff69cc9c663aa7e4c6de100509dc22 /io_uring
parentd13ddd9c893f0e8498526bf88c6b5fad01f0edd8 (diff)
downloadlwn-547988ad0f9661cd9632bdebd63cf38e008b55b2.tar.gz
lwn-547988ad0f9661cd9632bdebd63cf38e008b55b2.zip
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>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/io_uring.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index 86fd72f6a1c2..816e93e7f949 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -2597,13 +2597,11 @@ 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;
+ *sq_offset = SIZE_MAX;
return off;
}
- if (sq_offset)
- *sq_offset = off;
+ *sq_offset = off;
sq_array_size = array_size(sizeof(u32), sq_entries);
if (sq_array_size == SIZE_MAX)