From patchwork Mon Nov 21 10:20:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 13050569 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E00AC433FE for ; Mon, 21 Nov 2022 10:20:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A33A58E0001; Mon, 21 Nov 2022 05:20:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9E3DB6B0081; Mon, 21 Nov 2022 05:20:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8D2F08E0001; Mon, 21 Nov 2022 05:20:45 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 7DC366B0080 for ; Mon, 21 Nov 2022 05:20:45 -0500 (EST) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 5315480CA3 for ; Mon, 21 Nov 2022 10:20:45 +0000 (UTC) X-FDA: 80157055650.13.88BBC07 Received: from out30-43.freemail.mail.aliyun.com (out30-43.freemail.mail.aliyun.com [115.124.30.43]) by imf28.hostedemail.com (Postfix) with ESMTP id 905CEC0011 for ; Mon, 21 Nov 2022 10:20:43 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R771e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=7;SR=0;TI=SMTPD_---0VVKKCcj_1669026038; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VVKKCcj_1669026038) by smtp.aliyun-inc.com; Mon, 21 Nov 2022 18:20:39 +0800 From: Yang Li To: mike.kravetz@oracle.com Cc: songmuchun@bytedance.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] mm/hugetlb: stop using 0 as NULL pointer Date: Mon, 21 Nov 2022 18:20:37 +0800 Message-Id: <20221121102037.75307-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669026045; a=rsa-sha256; cv=none; b=Q59TWtDJHMzw6RJC5nzOQLP50cN2cZKiNrb1+7GjwX4rIzkWpDTf4xMtInBrr1t3G9zHRW k82Dx5cPci1iPbdKESKTxiiKzZSX5P1jSZx9w61M65nvao5bnavcADgPxUYQTdqykxTBq5 I2+SIXUHS/mmPtFSj+b8iAV38WpHv8Y= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf28.hostedemail.com: domain of yang.lee@linux.alibaba.com designates 115.124.30.43 as permitted sender) smtp.mailfrom=yang.lee@linux.alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669026045; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=36lP5aJD1lLfad48LgG+K8xja/OmeIAkTe2HxqndyGI=; b=2FtFt2cPSlBGlfl78yXLjtVG+pRPoCwGRCyFs80rLj94JT3zhuLL6JV64SJeGZx2nDrOk/ PpRYiU1ijEORmBb6BjhHniW9lony+E7yH8/Yh3KfNQOEKIGVRVtgZBPjvtIgYlcpAF7xCO UQloitJRmiKMkXFFuzjiVd5sP4ujmPE= X-Rspam-User: X-Rspamd-Queue-Id: 905CEC0011 Authentication-Results: imf28.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf28.hostedemail.com: domain of yang.lee@linux.alibaba.com designates 115.124.30.43 as permitted sender) smtp.mailfrom=yang.lee@linux.alibaba.com X-Stat-Signature: xahyyexmu1nb9g9oz6p9t7xsd9h36dko X-Rspamd-Server: rspam10 X-HE-Tag: 1669026043-212086 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: mm/hugetlb.c:1531:37: warning: Using plain integer as NULL pointer Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3224 Reported-by: Abaci Robot Signed-off-by: Yang Li Reviewed-by: David Hildenbrand --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 222937d512c4..b6c2fc882f21 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -1528,7 +1528,7 @@ static void add_hugetlb_folio(struct hstate *h, struct folio *folio, } folio_set_compound_dtor(folio, HUGETLB_PAGE_DTOR); - folio_change_private(folio, 0); + folio_change_private(folio, NULL); /* * We have to set HPageVmemmapOptimized again as above * folio_change_private(folio, 0) cleared it.