diff --git a/mm/gup.c b/mm/gup.c index caadd31714a5..43c71397c7ca 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1367,7 +1367,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)];