diff --git a/mm/gup.c b/mm/gup.c index bb4ad57d20e3..43b7d875de37 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1796,7 +1796,8 @@ static inline pte_t gup_get_pte(pte_t *ptep) } #endif /* CONFIG_GUP_GET_PTE_LOW_HIGH */ -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)];