Skip to content

Commit 6643773

Browse files
kvaneeshmpe
authored andcommitted
powerpc/mm: Fix build error with hugetlfs disabled
arch/powerpc/mm/slice.c:704:5: error: expected identifier or ‘(’ before numeric constant int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr, ^ make[1]: *** [arch/powerpc/mm/slice.o] Error 1 make: *** [arch/powerpc/mm/slice.o] Error 2 This got introduced via 1217d34 "powerpc: Ensure global functions include their prototype". We started including linux/hugetlb.h with that patch and now we have #define is_hugepage_only_range(mm, addr, len) 0 with hugetlbfs disabled. Fixes: 1217d34 ("powerpc: Ensure global functions include their prototype") Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent c3351df commit 6643773

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎arch/powerpc/mm/slice.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,7 @@ void slice_set_range_psize(struct mm_struct *mm, unsigned long start,
682682
slice_convert(mm, mask, psize);
683683
}
684684

685+
#ifdef CONFIG_HUGETLB_PAGE
685686
/*
686687
* is_hugepage_only_range() is used by generic code to verify whether
687688
* a normal mmap mapping (non hugetlbfs) is valid on a given area.
@@ -726,4 +727,4 @@ int is_hugepage_only_range(struct mm_struct *mm, unsigned long addr,
726727
#endif
727728
return !slice_check_fit(mask, available);
728729
}
729-
730+
#endif

0 commit comments

Comments
 (0)