-Wmissing-prototypes requires that the prototype actually be in scope, not just previously seen. Move it outside page_to_pgoff(). Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> --- include/linux/pagemap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 5f0582de24e7..c4b1514818ff 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -585,16 +585,16 @@ static inline pgoff_t page_to_index(struct page *page) return pgoff; } +extern pgoff_t hugetlb_basepage_index(struct page *page); + /* * Get the offset in PAGE_SIZE (even for hugetlb pages). * (TODO: hugetlb pages should have ->index in PAGE_SIZE) */ static inline pgoff_t page_to_pgoff(struct page *page) { - if (unlikely(PageHuge(page))) { - extern pgoff_t hugetlb_basepage_index(struct page *page); + if (unlikely(PageHuge(page))) return hugetlb_basepage_index(page); - } return page_to_index(page); } -- 2.30.2