summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGuoqing Jiang <guoqing.jiang@linux.dev>2023-11-13 14:57:12 +0300
committerLeon Romanovsky <leon@kernel.org>2023-11-15 16:58:13 +0300
commit2109ddf032ebc57e0cd43e4378474ea6f2a378c2 (patch)
tree0dfded5f3a6a3d01215957e24263f77851953d04 /drivers
parenta2b64565e8ea9530cce8e1c528f53ca888c0a45b (diff)
downloadlinux-2109ddf032ebc57e0cd43e4378474ea6f2a378c2.tar.xz
RDMA/siw: Use iov.iov_len in kernel_sendmsg
We can pass iov.iov_len here. Acked-by: Bernard Metzler <bmt@zurich.ibm.com> Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev> Link: https://lore.kernel.org/r/20231113115726.12762-4-guoqing.jiang@linux.dev Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/sw/siw/siw_qp_tx.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/siw/siw_qp_tx.c b/drivers/infiniband/sw/siw/siw_qp_tx.c
index 86186cd3cca4..838123c621e2 100644
--- a/drivers/infiniband/sw/siw/siw_qp_tx.c
+++ b/drivers/infiniband/sw/siw/siw_qp_tx.c
@@ -292,8 +292,7 @@ static int siw_tx_ctrl(struct siw_iwarp_tx *c_tx, struct socket *s,
(char *)&c_tx->pkt.ctrl + c_tx->ctrl_sent,
.iov_len = c_tx->ctrl_len - c_tx->ctrl_sent };
- int rv = kernel_sendmsg(s, &msg, &iov, 1,
- c_tx->ctrl_len - c_tx->ctrl_sent);
+ int rv = kernel_sendmsg(s, &msg, &iov, 1, iov.iov_len);
if (rv >= 0) {
c_tx->ctrl_sent += rv;