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: 23649 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1495767wrr; Mon, 21 Nov 2022 02:21:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf5nk5gzU1md4WcQVECvOtOH/jMAnLnkFm9DfwM903iw0EZXI9ozF/T3Io5rqgo0t1yWMkGW X-Received: by 2002:a17:906:2894:b0:7aa:7c3f:8603 with SMTP id o20-20020a170906289400b007aa7c3f8603mr14632364ejd.322.1669026111413; Mon, 21 Nov 2022 02:21:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669026111; cv=none; d=google.com; s=arc-20160816; b=tTLxH1EO62PQWIfcYN/rZ+/qMHOm135VwZkIQRwoPQmdK72aQdFJvJ88wOe9VEtYFc pPa+hCL7C5s69QK+5lbg68gFsquRHbFq6mZ74dd01kRFb63PIsqTuMjuxBuB2N25m3+Y S+tFVcQoAe9sI3pGE2Oi4+FoRbVQyCOoS/jgWSa/l++HVck/SnBBYkP4xobs0+Y/acSB hTuJtsRie1mi98PnHm1PvYel1uBXzf4P9lm5rXR9+xVpZ0+iHRkXqMwwVm9D+siumdDk 9vUV3Y2FMhnrhFRpOhXW9udG4qd4CM77ZWRv4B3/u6PLDoD5/SNDvuppgSRYJnyFD2/p i+2A== 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=36lP5aJD1lLfad48LgG+K8xja/OmeIAkTe2HxqndyGI=; b=0xBTjU63Bk6OPTCCSBGU9EaQivcrPlTX/3kSoJMRUHEmMK5/BGSqVYJCKZ/c8sP6Dl UcrCTQS0fhdtJr0zcr6iArqT+7MucMK5MmGF86BnZkcKcERH9QdMVSL9gtAciCGkaTSl z/fWHJB8X8hWg2V1a3ZEDJjOmVR3xkqgRdIoxhZAYWg94mqNsNnNTm1Q7jWqmCjs/Hy+ GlmjR1YHK+wS/l3PSaDnYRgy6ZyEgITf8u4sJE3pil6aQ4tDGCdAcW1gS34EkFu8yS5u M97i0LNQ3tLSjQVN+9827E2EwgeoI8TrFo30BjbEjaA+vUVufkUxk3gqjjzC64YmV2Td XBkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z10-20020a05640235ca00b004618cd22f7bsi9304931edc.142.2022.11.21.02.21.25; Mon, 21 Nov 2022 02:21:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231308AbiKUKUq (ORCPT + 99 others); Mon, 21 Nov 2022 05:20:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbiKUKUo (ORCPT ); Mon, 21 Nov 2022 05:20:44 -0500 Received: from out30-133.freemail.mail.aliyun.com (out30-133.freemail.mail.aliyun.com [115.124.30.133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E74C427CE0 for ; Mon, 21 Nov 2022 02:20:42 -0800 (PST) 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 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750100723560019126?= X-GMAIL-MSGID: =?utf-8?q?1750100723560019126?= 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.