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)];