mbox series

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

Message ID 20191112194558.139389-1-mike.kravetz@oracle.com (mailing list archive)
Headers show
Series hugetlbfs: convert macros to static inline, fix sparse warning | expand

Message

Mike Kravetz Nov. 12, 2019, 7:45 p.m. UTC
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@lists.01.org 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(-)