Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 1217d34b531c76362217057ca70a8ce8950574e0
"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: 1217d34b531c ("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>

authored by

Aneesh Kumar K.V and committed by
Michael Ellerman
6643773c c3351dfa

+2 -1
+2 -1
arch/powerpc/mm/slice.c
··· 682 682 slice_convert(mm, mask, psize); 683 683 } 684 684 685 + #ifdef CONFIG_HUGETLB_PAGE 685 686 /* 686 687 * is_hugepage_only_range() is used by generic code to verify whether 687 688 * a normal mmap mapping (non hugetlbfs) is valid on a given area. ··· 727 726 #endif 728 727 return !slice_check_fit(mask, available); 729 728 } 730 - 729 + #endif