diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index d41edd28298b68ff335e6324df7e4e793a481d93..15959d35fc26c16e2d1ce622b83a375a95a7db18 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -469,7 +469,7 @@ static bool is_zspage_isolated(struct zspage *zspage)
 	return zspage->isolated;
 }
 
-static int is_first_page(struct page *page)
+static __maybe_unused int is_first_page(struct page *page)
 {
 	return PagePrivate(page);
 }