linux-next: build warning after merge of the akpm-current tree
Subsystems (3)
Hi all,
After merging the akpm-current tree, today's linux-next build (arm multi_v7_defconfig) produced this warning:
mm/gup.c:119:13: warning: 'put_compound_head' defined but not used [-Wunused-function]
119 | static void put_compound_head(struct page *page, int refs, unsigned int flags)
| ^~~~~~~~~~~~~~~~~
Introduced by commit
6379e529ebe4 ("mm/gup: fixup for 9947ea2c1e608e32 "mm/gup: track FOLL_PIN pages"")
Signature · 2 lines
Cheers, Stephen Rothwell
Andrew Morton
maintainerQuoted 5 lines · On Thu, 12 Mar 2020 18:27:25 +1100 Stephen Rothwell <[email protected]>…
Hi all,
After merging the akpm-current tree, today's linux-next build (arm
multi_v7_defconfig) produced this warning:
Quoted 8 lines
mm/gup.c:119:13: warning: 'put_compound_head' defined but not used [-Wunused-function]
119 | static voidput_compound_head(struct page *page, int refs, unsigned int flags)| ^~~~~~~~~~~~~~~~~Introduced by commit
6379e529ebe4("mm/gup: fixup for9947ea2c1e608e32"mm/gup: trackFOLL_PINpages"")
Thanks.
I think this is right. And I don't think it'll apply to most recent -next.
mm/gup.c renamed from mm/gup.c~mm-gup-track-foll_pin-pages-fix-2-fix +17 -15
@@ -78,21 +78,6 @@ static __maybe_unused struct page *try_greturn NULL ; } -static void put_compound_head (struct page *page,int refs,unsigned int flags) -{ -if (flags &FOLL_PIN ) - refs *=GUP_PIN_COUNTING_BIAS ; - -VM_BUG_ON_PAGE (page_ref_count (page) < refs, page); -/* -* Calling put_page() for each ref is unnecessarily slow. Only the last -* ref needs a put_page(). -*/ -if (refs >1 ) -page_ref_sub (page, refs -1 ); -put_page (page); -} -/** * try_grab_page() - elevate a page's refcount by a flag-dependent amount *
@@ -1967,7 +1952,24 @@ EXPORT_SYMBOL(get_user_pages_unlocked);* This code is based heavily on the PowerPC implementation by Nick Piggin. */ #ifdef CONFIG_HAVE_FAST_GUP + +static void put_compound_head (struct page *page,int refs,unsigned int flags) +{ +if (flags &FOLL_PIN ) + refs *=GUP_PIN_COUNTING_BIAS ; + +VM_BUG_ON_PAGE (page_ref_count (page) < refs, page); +/* +* Calling put_page() for each ref is unnecessarily slow. Only the last +* ref needs a put_page(). +*/ +if (refs >1 ) +page_ref_sub (page, refs -1 ); +put_page (page); +} +#ifdef CONFIG_GUP_GET_PTE_LOW_HIGH +/* * WARNING: only to be used in the get_user_pages_fast() implementation. *
_