io_uring/net: cast min_not_zero() type
Jens Axboe
maintainerPATCH 1/1 io_uring/net: cast min_not_zero() type
kernel test robot reports that xtensa complains about different signedness for a min_not_zero() comparison. Cast the int part to size_t to avoid this issue.
Fixes e227c8cdb47b ("io_uring/net: use passed in 'len' in io_recv_buf_select()")
Reported-by kernel test robot <[email protected]>
Signed-off-by Jens Axboe <[email protected]>
---
io_uring/net.c +1 -1
@@ -1092,7 +1092,7 @@ static int io_recv_buf_select(struct io_kiocb *req, struct io_async_msghdr *kmsgif (*len) arg.max_len = *len;else if (kmsg->msg.msg_inq >1 ) - arg.max_len =min_not_zero (*len, kmsg->msg.msg_inq); + arg.max_len =min_not_zero (*len, (size_t ) kmsg->msg.msg_inq); ret =io_buffers_peek (req, &arg);if (unlikely (ret <0 ))
Signature · 1 line
Jens Axboe