Skip to content

Commit

Permalink
staging: lustre: Fix address space mismatch in ksocknal_recv_iov()
Browse files Browse the repository at this point in the history
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 simplifying an expression containing non-__user-attributed type names.

Signed-off-by: Artemiy Volkov <artemiyv@acm.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Artemiy Volkov authored and Greg Kroah-Hartman committed Sep 14, 2014
1 parent 4127ef9 commit 2101f98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2101f98

Please sign in to comment.