Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3095263pxf; Mon, 15 Mar 2021 00:51:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzY5/8liE5NIoHIjGLh+kvrUvWkIOS0zixP9kOSLk9uyg6Jhfj0Qmy9bPWJJ7T4zpSQCg3H X-Received: by 2002:a05:6402:510f:: with SMTP id m15mr28927601edd.328.1615794713603; Mon, 15 Mar 2021 00:51:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615794713; cv=none; d=google.com; s=arc-20160816; b=QQ7R8oNgY5voP/ky/RRtjKH2lgq23lESdoq/TxKAkE6x1kmzyp3TvND283mti9C0LU oWCHHmj0eBM3TZn0UK24EcOIjqozSP51MqScfCArCC9iluvVVl0ZpBtuKnwPqJlFLHkt 1Q0OH7DmJfzD2ygmt+I1e/nNE7h+kVj5FMG1sJhXEBAF2R7n0vnBgrMRtwfUOhoEs6hv zS8ugCAyLTL7QNyYSOlFnr7uI89llkND8F70RlHSAmrHKNAQmD+DkOzhkIIp4P0VivbJ ectu4jdToXylH3z8mSgG24ZS5fPFIJNU8t/SXmIzKcQLEl2yEY4vNNwk5oxxj9Ntm6YL C10g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=69HSDfv+dDDaoejK44Ujio0ceC4xP/he2ed/JiM9Fhk=; b=T2q6uORpAVv47T8PK2U6uUeasYheZEGQOVhQhbQG2+z1e45hY2X/co3girhQvw5u0U gU62FiErA6IxG9pUc3tVj5Y8kxfadaLsTt+ArRw5fg4R1XSpyVgvMo20wgzq2u2aq82t DdOh0NQoqlQWZgDjYGIKKReezo61dDHlV98HRvqdjs+WBMA7ZBCS3lJtyfJ6pBNxYfst UYmG1JYK5B94cCnD0v+QNquMQOlAxAj11g/UujNyQK4Cb6JwneQXD3Jq7nqjLIv0LBw3 UJSkps0ASj/tbrWvo3pf6lwkj2alXCw5ULcyM1mu4ELSzNiMg1+HOp5hS/Gz1VMbo9l4 ti1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j20si10237463ejs.411.2021.03.15.00.51.31; Mon, 15 Mar 2021 00:51:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229964AbhCOHue (ORCPT + 99 others); Mon, 15 Mar 2021 03:50:34 -0400 Received: from out30-56.freemail.mail.aliyun.com ([115.124.30.56]:56681 "EHLO out30-56.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230260AbhCOHuP (ORCPT ); Mon, 15 Mar 2021 03:50:15 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04420;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0URx1vzQ_1615794607; Received: from j63c13417.sqa.eu95.tbsite.net(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0URx1vzQ_1615794607) by smtp.aliyun-inc.com(127.0.0.1); Mon, 15 Mar 2021 15:50:13 +0800 From: Jiapeng Chong To: shuah@kernel.org Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong Subject: [PATCH] tools/testing/selftests/vm/: fix warning comparing pointer to 0 Date: Mon, 15 Mar 2021 15:50:06 +0800 Message-Id: <1615794606-114484-1-git-send-email-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccicheck warning: ./tools/testing/selftests/vm/map_populate.c:82:16-17: WARNING comparing pointer to 0. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- tools/testing/selftests/vm/map_populate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/vm/map_populate.c b/tools/testing/selftests/vm/map_populate.c index 6b8aeaa..fb11b9e 100644 --- a/tools/testing/selftests/vm/map_populate.c +++ b/tools/testing/selftests/vm/map_populate.c @@ -79,7 +79,7 @@ int main(int argc, char **argv) unsigned long *smap; ftmp = tmpfile(); - BUG_ON(ftmp == 0, "tmpfile()"); + BUG_ON(!ftmp, "tmpfile()"); ret = ftruncate(fileno(ftmp), MMAP_SZ); BUG_ON(ret, "ftruncate()"); -- 1.8.3.1