Skip to content

Commit

Permalink
caif: don't assume iov_iter type
Browse files Browse the repository at this point in the history
The details of the iov_iter types are appropriately abstracted, so
there's no need to check for specific type fields. Just let the
abstractions handle it.

This is preparing for io_uring/net's io_send to utilize the more
efficient ITER_UBUF.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20230111184245.3784393-1-kbusch@meta.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Keith Busch authored and Jakub Kicinski committed Jan 14, 2023
1 parent e471d83 commit c191751
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/caif/caif_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,10 +533,6 @@ static int caif_seqpkt_sendmsg(struct socket *sock, struct msghdr *msg,
if (msg->msg_namelen)
goto err;

ret = -EINVAL;
if (unlikely(msg->msg_iter.nr_segs == 0) ||
unlikely(msg->msg_iter.iov->iov_base == NULL))
goto err;
noblock = msg->msg_flags & MSG_DONTWAIT;

timeo = sock_sndtimeo(sk, noblock);
Expand Down

0 comments on commit c191751

Please sign in to comment.