summaryrefslogtreecommitdiffstats
path: root/mm/gup.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2019-07-11 20:57:46 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-31 07:24:53 +0200
commitffd51eba9112438382acd9850a2bc3f29bb57b65 (patch)
tree421a608dd3b75a53d4f34ad4aa68f3be2c93ea41 /mm/gup.c
parent8aaa5eef4cff96025180c7e8893dbbe186a9681d (diff)
downloadlinux-stable-ffd51eba9112438382acd9850a2bc3f29bb57b65.tar.gz
linux-stable-ffd51eba9112438382acd9850a2bc3f29bb57b65.tar.bz2
linux-stable-ffd51eba9112438382acd9850a2bc3f29bb57b65.zip
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 <linux@roeck-us.net> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'mm/gup.c')
-rw-r--r--mm/gup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/gup.c b/mm/gup.c
index ddde097cf9e4..22855ff0b448 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1696,7 +1696,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)];