[PATCH] fix unused function warnings
From: Zi Yan
Date: Fri May 09 2025 - 09:29:09 EST
1. add __maybe_unused to get_pageblock_isolate(), which is used in
VM_BUG_ON only.
2. remove unused set_pageblock_isolate().
Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
---
mm/page_isolation.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index b0f83a7c508d..ce7e38c9f839 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -15,7 +15,7 @@
#define CREATE_TRACE_POINTS
#include <trace/events/page_isolation.h>
-static inline bool get_pageblock_isolate(struct page *page)
+static inline bool __maybe_unused get_pageblock_isolate(struct page *page)
{
return get_pfnblock_flags_mask(page, page_to_pfn(page),
PB_migrate_isolate_bit);
@@ -25,12 +25,6 @@ static inline void clear_pageblock_isolate(struct page *page)
set_pfnblock_flags_mask(page, 0, page_to_pfn(page),
PB_migrate_isolate_bit);
}
-static inline void set_pageblock_isolate(struct page *page)
-{
- set_pfnblock_flags_mask(page, PB_migrate_isolate_bit,
- page_to_pfn(page),
- PB_migrate_isolate_bit);
-}
/*
* This function checks whether the range [start_pfn, end_pfn) includes
--
2.47.2
--
Best Regards,
Yan, Zi