From: Guenter Roeck Date: Fri, 12 Jul 2019 03:57:46 +0000 (-0700) Subject: mm/gup.c: mark undo_dev_pagemap as __maybe_unused X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b57e8d21123b1c4b0b8847746557da285f0740de;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git mm/gup.c: mark undo_dev_pagemap as __maybe_unused [ Upstream commit 790c73690c2bbecb3f6f8becbdb11ddc9bcff8cc ] Several mips builds generate the following build warning. mm/gup.c:1788:13: warning: 'undo_dev_pagemap' defined but not used The function is declared unconditionally but only called from behind various ifdefs. Mark it __maybe_unused. Link: http://lkml.kernel.org/r/1562072523-22311-1-git-send-email-linux@roeck-us.net Signed-off-by: Guenter Roeck Reviewed-by: Andrew Morton Cc: Stephen Rothwell Cc: Robin Murphy Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- diff --git a/mm/gup.c b/mm/gup.c index babcbd6d99c3..cee599d1692c 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1364,7 +1364,8 @@ static inline pte_t gup_get_pte(pte_t *ptep) } #endif -static void undo_dev_pagemap(int *nr, int nr_start, struct page **pages) +static void __maybe_unused undo_dev_pagemap(int *nr, int nr_start, + struct page **pages) { while ((*nr) - nr_start) { struct page *page = pages[--(*nr)];