Skip to content

Commit 62f31bd

Browse files
rpptakpm00
authored andcommitted
mm: move free_area_empty() to mm/internal.h
The free_area_empty() helper is only used inside mm/ so move it there to reduce noise in include/linux/mmzone.h Link: https://lkml.kernel.org/r/20230326160215.2674531-1-rppt@kernel.org Signed-off-by: Mike Rapoport (IBM) <rppt@kernel.org> Suggested-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent e961cc5 commit 62f31bd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/linux/mmzone.h

-5
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,6 @@ struct free_area {
110110
unsigned long nr_free;
111111
};
112112

113-
static inline bool free_area_empty(struct free_area *area, int migratetype)
114-
{
115-
return list_empty(&area->free_list[migratetype]);
116-
}
117-
118113
struct pglist_data;
119114

120115
#ifdef CONFIG_NUMA

mm/internal.h

+5
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,11 @@ void init_cma_reserved_pageblock(struct page *page);
517517
int find_suitable_fallback(struct free_area *area, unsigned int order,
518518
int migratetype, bool only_stealable, bool *can_steal);
519519

520+
static inline bool free_area_empty(struct free_area *area, int migratetype)
521+
{
522+
return list_empty(&area->free_list[migratetype]);
523+
}
524+
520525
/*
521526
* These three helpers classifies VMAs for virtual memory accounting.
522527
*/

0 commit comments

Comments
 (0)