Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2065923rdb; Thu, 7 Dec 2023 18:05:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkshcQ0RSPYV+Z01XsnN0wWSEj8DuAetqj/N15V6fCJZF60Qh+4LMsnzpWXSEugNjPpkJy X-Received: by 2002:a05:6a20:da85:b0:18f:e27f:dd44 with SMTP id iy5-20020a056a20da8500b0018fe27fdd44mr253082pzb.13.1702001107042; Thu, 07 Dec 2023 18:05:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702001107; cv=none; d=google.com; s=arc-20160816; b=nnrwdUoVYtdC522kdXbqvIWoa3n0ab0+Cl2uKU88UARGDO46/C5jWtKV8TXwtDO4+l +J0u5HEegqBX0WVgJI+cpG+USii4NmMlAtGK1avYvSLmG4kkp8G1qo0Uuu0DqU67AgwQ Y6VCS3E/y1W1yymsZ2hFsrSy4VYQQ8XSGNXuW5tz6zMvGOx4iTt6mwoKSasiYsbJ6PCp UIYZe+PC9mUNNvbZd5LjPPU2EoCnpOxru2siVu/pcvtQ3DEXcB59/Yne/Nz4JouMfJSJ gIJchuv811jINOABZsTdtimW/oeKh4bNrBuC/ouqNrvMv7pPge//hW77Pmh7w2mNB57P Iecg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=nwC4JllsPWikGcaQ4XbMvrzol297GH1fkHwAZXepAFs=; fh=CPYiqJtd/UxhBwBs+tyRl+F+zfy9RYPGDd3+jKSgKdc=; b=YZyW143LKqqpeImYzmMLTToIHS+MqQzo1Gup09tCtDxmwp6/SGvR7pJBAUZScMmaTQ x/H3NiREk6RLUKT98hTyJ7w+rLJTthF2uVw+ubqS9qhPeEy4ymFxFOmnz18d+Zfe/kfM LKXTsEyx1bajLZfAMKAvRPL9iggEfJxS1xJmxJIJLwagGHXBxFOaLnrDHQDwAJOvM2mH NN2i6MRPsX3Kh6qWgLZq+4Nke7Lvouv43U0yEoWGu2BD/o9NwT1hIfRPbLUnw5lSNJps GFCZ+E+T+y5bxSeumZtv0itGtpx32qLA3G1vKeTgVh/J5Ue9Wu75N0Y/Puy4ccS7dsT1 LOLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id x3-20020a63fe43000000b005a9fb6bf73esi637765pgj.293.2023.12.07.18.05.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Dec 2023 18:05:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 085CA80ACB5F; Thu, 7 Dec 2023 18:05:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1572961AbjLHCEz (ORCPT + 99 others); Thu, 7 Dec 2023 21:04:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230225AbjLHCEy (ORCPT ); Thu, 7 Dec 2023 21:04:54 -0500 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73AD5121; Thu, 7 Dec 2023 18:04:59 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046049;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0Vy1IIqL_1702001090; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0Vy1IIqL_1702001090) by smtp.aliyun-inc.com; Fri, 08 Dec 2023 10:04:57 +0800 From: Jiapeng Chong To: Liam.Howlett@oracle.com Cc: willy@infradead.org, maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] maple_tree: Fix warning comparing pointer to 0 Date: Fri, 8 Dec 2023 10:04:50 +0800 Message-Id: <20231208020450.7003-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 07 Dec 2023 18:05:06 -0800 (PST) Avoid pointer type value compared with 0 to make code clear. ./tools/testing/radix-tree/maple.c:34142:15-16: WARNING comparing pointer to 0. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7696 Signed-off-by: Jiapeng Chong --- tools/testing/radix-tree/maple.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/radix-tree/maple.c b/tools/testing/radix-tree/maple.c index 56ae47291ee0..687886cebd9d 100644 --- a/tools/testing/radix-tree/maple.c +++ b/tools/testing/radix-tree/maple.c @@ -34139,7 +34139,7 @@ STORE, 140501948112896, 140501948116991, mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); check_erase2_testset(mt, set27, ARRAY_SIZE(set27)); rcu_barrier(); - MT_BUG_ON(mt, 0 != mtree_load(mt, 140415537422336)); + MT_BUG_ON(mt, NULL != mtree_load(mt, 140415537422336)); mt_set_non_kernel(0); mt_validate(mt); mtree_destroy(mt); @@ -34263,7 +34263,7 @@ STORE, 140501948112896, 140501948116991, mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); check_erase2_testset(mt, set37, ARRAY_SIZE(set37)); rcu_barrier(); - MT_BUG_ON(mt, 0 != mtree_load(mt, 94637033459712)); + MT_BUG_ON(mt, NULL != mtree_load(mt, 94637033459712)); mt_validate(mt); mtree_destroy(mt); @@ -34271,7 +34271,7 @@ STORE, 140501948112896, 140501948116991, mt_init_flags(mt, MT_FLAGS_ALLOC_RANGE); check_erase2_testset(mt, set38, ARRAY_SIZE(set38)); rcu_barrier(); - MT_BUG_ON(mt, 0 != mtree_load(mt, 94637033459712)); + MT_BUG_ON(mt, NULL != mtree_load(mt, 94637033459712)); mt_validate(mt); mtree_destroy(mt); -- 2.20.1.7.g153144c