staging:lustre:lnet: Incorrect type in assignment
PATCH 1/1 staging:lustre:lnet: Incorrect type in assignment
From: Sun Wang <[email protected]>
Incorrect type when assign value to varible iov_base.
Signed-off-by Sun Wang <[email protected]>
---
.../drivers => drivers}/staging/lustre/lnet/lnet/lib-move.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/lustre/lnet/lnet/lib-move.c +2 -1
@@ -256,7 +256,8 @@ lnet_extract_iov(int dst_niov, struct iovec *dst,LASSERT ((int )niov <= dst_niov); frag_len = src->iov_len - offset; - dst->iov_base = ((char *)src->iov_base) + offset; + dst->iov_base = (void __user *) + (((char *)src->iov_base) + offset);if (len <= frag_len) { dst->iov_len = len;
Quoted 1 line · sunwxg
Incorrect type when assign value to varible
iov_base.
[]
drivers/staging/lustre/lnet/lnet/lib-move.c
Quoted 1 line
drivers/staging/lustre/lnet/lnet/lib-move.c +0
-0
[]
drivers/staging/lustre/lnet/lnet/lib-move.c lnet_extract_iov(int dst_niov, struct iovec *dst, · line 260
Quoted 7 lines
drivers/staging/lustre/lnet/lnet/lib-move.c +2
-1@@ -256,7 +256,8 @@ lnet_extract_iov(int dst_niov, struct iovec *dst,LASSERT ((int )niov <= dst_niov); frag_len = src->iov_len - offset; - dst->iov_base = ((char *)src->iov_base) + offset; + dst->iov_base = (void __user *) + (((char *)src->iov_base) + offset);
Just use void * arithmetic and remove the cast
dst->iov_base = src->iov_base + offset;