blob: 0265efba29ec184b25aba53713ca73aee4fbb7b9 [file] [log] [blame]
From: Yang Li <yang.lee@linux.alibaba.com>
Subject: mm/hugetlb: stop using 0 as NULL pointer
Date: Mon, 21 Nov 2022 18:20:37 +0800
mm/hugetlb.c:1531:37: warning: Using plain integer as NULL pointer
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3224
Link: https://lkml.kernel.org/r/20221121102037.75307-1-yang.lee@linux.alibaba.com
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/hugetlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/hugetlb.c~mm-hugetlb-stop-using-0-as-null-pointer
+++ a/mm/hugetlb.c
@@ -1530,7 +1530,7 @@ static void add_hugetlb_page(struct hsta
}
set_compound_page_dtor(page, HUGETLB_PAGE_DTOR);
- set_page_private(page, 0);
+ set_page_private(page, NULL);
/*
* We have to set HPageVmemmapOptimized again as above
* set_page_private(page, 0) cleared it.
_