mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-15 21:23:23 +00:00
hugetlb: make hugetlb_cma_check() static
Patch series "A few cleanup patches for hugetlb", v2. This series contains a few cleanup patches to use helper functions to simplify the codes, remove unneeded nid parameter and so on. More details can be found in the respective changelogs. This patch (of 10): Make hugetlb_cma_check() static as it's only used inside mm/hugetlb.c. Link: https://lkml.kernel.org/r/20220901120030.63318-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20220901120030.63318-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
454552d014
commit
263b899802
@ -1123,14 +1123,10 @@ static inline spinlock_t *huge_pte_lock(struct hstate *h,
|
||||
|
||||
#if defined(CONFIG_HUGETLB_PAGE) && defined(CONFIG_CMA)
|
||||
extern void __init hugetlb_cma_reserve(int order);
|
||||
extern void __init hugetlb_cma_check(void);
|
||||
#else
|
||||
static inline __init void hugetlb_cma_reserve(int order)
|
||||
{
|
||||
}
|
||||
static inline __init void hugetlb_cma_check(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
bool want_pmd_share(struct vm_area_struct *vma, unsigned long addr);
|
||||
|
10
mm/hugetlb.c
10
mm/hugetlb.c
@ -4030,6 +4030,14 @@ static void hugetlb_register_all_nodes(void) { }
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CMA
|
||||
static void __init hugetlb_cma_check(void);
|
||||
#else
|
||||
static inline __init void hugetlb_cma_check(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
static int __init hugetlb_init(void)
|
||||
{
|
||||
int i;
|
||||
@ -7361,7 +7369,7 @@ void __init hugetlb_cma_reserve(int order)
|
||||
hugetlb_cma_size = 0;
|
||||
}
|
||||
|
||||
void __init hugetlb_cma_check(void)
|
||||
static void __init hugetlb_cma_check(void)
|
||||
{
|
||||
if (!hugetlb_cma_size || cma_reserve_called)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user