From 2101f98caf8246cbf6b7ad40a585c017379c389e Mon Sep 17 00:00:00 2001 From: Artemiy Volkov Date: Sat, 13 Sep 2014 02:31:33 +1000 Subject: [PATCH] staging: lustre: Fix address space mismatch in ksocknal_recv_iov() 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] *iov_base drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c:284:39: got void * by simplifying an expression containing non-__user-attributed type names. Signed-off-by: Artemiy Volkov Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 2 +- 1 file changed, 1 insertion(+), 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 34c6abd11e35..bcfee7c21942 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c @@ -281,7 +281,7 @@ 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 += nob; return -EAGAIN; } -- 2.39.5