[PATCH 0/2] hugetlbfs: convert macros to static inline, fix sparse warning

From: Mike Kravetz
Date: Tue Nov 12 2019 - 14:46:31 EST


The definition for huge_pte_offset() in <linux/hugetlb.h> causes a sparse
warning in the !CONFIG_HUGETLB_PAGE. Fix this as well as converting
all macros in this block of definitions to static inlines for better type
checking.

When making the above changes, build errors were found in powerpc due to
duplicate definitions. A separate powerpc specific patch is included as
a requisite to remove the definitions and get them from <linux/hugetlb.h>.

Cc: kbuild@xxxxxxxxxxxx in an attmept to flush out any other build issues.

Mike Kravetz (2):
powerpc/mm: remove pmd_huge/pud_huge stubs and include hugetlb.h
hugetlbfs: convert macros to static inline, fix sparse warning

.../include/asm/book3s/64/pgtable-4k.h | 3 -
.../include/asm/book3s/64/pgtable-64k.h | 3 -
arch/powerpc/mm/book3s64/radix_pgtable.c | 1 +
include/linux/hugetlb.h | 137 +++++++++++++++---
4 files changed, 116 insertions(+), 28 deletions(-)

--
2.23.0