Skip to contentSkip to conversation

mm: move free_area_empty() to mm/internal.h

PATCH Applied Mike Rapoport 1 participant 1 message Mar 26, 2023

Subsystems (3)
lore
Share & tools
lore

Mike Rapoport

author reviewer
#0 lore raw

PATCH 1/1 mm: move free_area_empty() to mm/internal.h

From: "Mike Rapoport (IBM)" <[email protected]>

The free_area_empty() helper is only used inside mm/ so move it there to reduce noise in include/linux/mmzone.h

---
 include/linux/mmzone.h | 5 -----
 mm/internal.h          | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)
include/linux/mmzone.h +0 -5
index 72837e019bd1..3ccada5e8799 100644
@@ -110,11 +110,6 @@ struct free_area {
 	unsigned long		nr_free;
 };
 
-static inline bool free_area_empty(struct free_area *area, int migratetype)
-{
-	return list_empty(&area->free_list[migratetype]);
-}
-
 struct pglist_data;
 
 #ifdef CONFIG_NUMA
mm/internal.h +5 -0
index c05ad651b515..18cda26b8a92 100644
@@ -517,6 +517,11 @@ void init_cma_reserved_pageblock(struct page *page);
 int find_suitable_fallback(struct free_area *area, unsigned int order,
 			int migratetype, bool only_stealable, bool *can_steal);
 
+static inline bool free_area_empty(struct free_area *area, int migratetype)
+{
+	return list_empty(&area->free_list[migratetype]);
+}
+
 /*
  * These three helpers classifies VMAs for virtual memory accounting.
  */

base-commit: 51551d71edbc998fd8c8afa7312db3d270f5998e

Signature · 1 line
2.35.1