Skip to contentSkip to conversation

io_uring/net: cast min_not_zero() type

PATCH New Jens Axboe 1 participant 1 message Jul 14, 2025 io_uring

lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 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()")

---

io_uring/net.c +1 -1
index 40f4ac0ab151..639f111408a1 100644
@@ -1092,7 +1092,7 @@ static int io_recv_buf_select(struct io_kiocb *req, struct io_async_msghdr *kmsg
 		if (*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