aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lnet
diff options
context:
space:
mode:
authorRui Teng <rui.teng@linux.vnet.ibm.com>2017-07-13 10:10:17 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-16 08:41:02 +0200
commit186882700fa266cd379295bae289097443fa230b (patch)
tree8f296da8498f6a8091621c856e1c31540b16347d /drivers/staging/lustre/lnet
parentstaging: ccree: move comment to fit coding style (diff)
downloadlinux-dev-186882700fa266cd379295bae289097443fa230b.tar.xz
linux-dev-186882700fa266cd379295bae289097443fa230b.zip
staging: lustre: fix sparse error: incompatible types in comparison expression
Comparing two user space addresses to avoid sparse error: drivers/staging//lustre/lnet/selftest/conrpc.c:490:30: error: incompatible types in comparison expression (different address spaces) Signed-off-by: Rui Teng <rui.teng@linux.vnet.ibm.com> Acked-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet')
-rw-r--r--drivers/staging/lustre/lnet/selftest/conrpc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c b/drivers/staging/lustre/lnet/selftest/conrpc.c
index da36c55b86d3..ae7c2772825e 100644
--- a/drivers/staging/lustre/lnet/selftest/conrpc.c
+++ b/drivers/staging/lustre/lnet/selftest/conrpc.c
@@ -487,10 +487,9 @@ lstcon_rpc_trans_interpreter(struct lstcon_rpc_trans *trans,
sizeof(struct list_head)))
return -EFAULT;
- if (tmp.next == head_up)
- return 0;
-
next = tmp.next;
+ if (next == head_up)
+ return 0;
ent = list_entry(next, struct lstcon_rpc_ent, rpe_link);