From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-119.freemail.mail.aliyun.com (out30-119.freemail.mail.aliyun.com [115.124.30.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EEF218E1E for ; Fri, 24 May 2024 07:17:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.119 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716535037; cv=none; b=IntIn+kTIT0jDL6sUAvvpE9MKE5daLfTcpBLNsNo6cacSoH0OZFl0/Py0yQfgrcEjlqmLwKeAuxg0JLyR0H9Di3ugHO4daCEcQO077qRg6ilzt56zF6ctJ8g4doZ4mw4x9oISD3KCJPO/3U78tKQ+Zn7qfNZf57lFmsQ2w0JzAk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716535037; c=relaxed/simple; bh=epQCMj6liaNyJKlgtrEwum2Sais5F5kH3zdh6Ga1KMM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GmP8JE/ouLh/EH++IosMRPp94qMNOUdRYbS/ofz0PIqp5L1bhH+J6OGpPYGCfjKXXs+stV6eCT0n8n+AcqP6sSDOOGAe83qPM0eBTE+iVLD/oF+epnLXwgNy2CnDog7C3t7HuDz4x1cc+aNpIaeZrw/Ih0JijWSpPQ6iN8D+Zpo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=LebbOykl; arc=none smtp.client-ip=115.124.30.119 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="LebbOykl" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1716535026; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=9kE5+w2PYj6eGYpIIldbh4TJulssfp+nNT8yXcCeH18=; b=LebbOyklCTcN+nkCJ110GMXymxIriRcoLAM3HlRniwvoj6JZYLVsohJe7QZApTIBSulAhsRMc+OeGvs5DFPqZ/piJ6zPG+2Fjd9kPVAlVtTPTFdPq5P2Tb0TTVwS6X7NICyS00RUEhsPuJFlGIWtoIDUPq0a9pgiXdblZiZeZKc= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033045046011;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0W75o86V_1716535018; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0W75o86V_1716535018) by smtp.aliyun-inc.com; Fri, 24 May 2024 15:17:06 +0800 From: Jiapeng Chong To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] XArray tests: Compare pointers to NULL instead of 0 Date: Fri, 24 May 2024 15:16:55 +0800 Message-Id: <20240524071655.31386-1-jiapeng.chong@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Avoid pointer type value compared with 0 to make code clear. ./lib/test_xarray.c:973:52-53: WARNING comparing pointer to 0 Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9169 Signed-off-by: Jiapeng Chong --- lib/test_xarray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_xarray.c b/lib/test_xarray.c index ab9cc42a0d74..a281436267ce 100644 --- a/lib/test_xarray.c +++ b/lib/test_xarray.c @@ -975,7 +975,7 @@ static noinline void check_xa_alloc_1(struct xarray *xa, unsigned int base) XA_BUG_ON(xa, xa_alloc(xa, &id, xa_mk_index(10), XA_LIMIT(10, 5), GFP_KERNEL) != -EBUSY); - XA_BUG_ON(xa, xa_store_index(xa, 3, GFP_KERNEL) != 0); + XA_BUG_ON(xa, NULL != xa_store_index(xa, 3, GFP_KERNEL)); XA_BUG_ON(xa, xa_alloc(xa, &id, xa_mk_index(10), XA_LIMIT(10, 5), GFP_KERNEL) != -EBUSY); xa_erase_index(xa, 3); -- 2.20.1.7.g153144c