This patch fixes the following sparse warnings: drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:51: warning: cast removes address space of expression drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:39: warning: incorrect type in assignment (different address spaces) drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:39: expected void [noderef] <asn:1>*iov_base drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:39: got void *<noident> by adding the __user attribute to the names of userspace pointer types in the cast operators of ksocknal_recv_iov(). Signed-off-by: Artemiy Volkov <artemiyv@xxxxxxx> --- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c index 5214399..b3065db 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c @@ -281,7 +281,8 @@ ksocknal_recv_iov (ksock_conn_t *conn) if (nob < (int)iov->iov_len) { iov->iov_len -= nob; - iov->iov_base = (void *)((char *)iov->iov_base + nob); + iov->iov_base = (void __user *) + ((char __user *)iov->iov_base + nob); return -EAGAIN; } -- 1.9.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel