Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751069AbdGMCKs (ORCPT ); Wed, 12 Jul 2017 22:10:48 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:60182 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750877AbdGMCKr (ORCPT ); Wed, 12 Jul 2017 22:10:47 -0400 From: Rui Teng To: Oleg Drokin , Andreas Dilger , James Simmons , Greg Kroah-Hartman Cc: lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Rui Teng Subject: [PATCH] stating: lustre: fix sparse error: incompatible types in comparison expression Date: Thu, 13 Jul 2017 10:10:17 +0800 X-Mailer: git-send-email 2.11.0 X-TM-AS-GCONF: 00 x-cbid: 17071302-0028-0000-0000-00000801FF7C X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007358; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000214; SDB=6.00886763; UDB=6.00442676; IPR=6.00666912; BA=6.00005469; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00016205; XFM=3.00000015; UTC=2017-07-13 02:10:45 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17071302-0029-0000-0000-000036A6E716 Message-Id: <20170713021017.5368-1-rui.teng@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-12_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707130027 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 925 Lines: 29 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 --- drivers/staging/lustre/lnet/selftest/conrpc.c | 5 ++--- 1 file 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); -- 2.11.0