path: root/mm/internal.h
diff options
authorMel Gorman <>2021-06-30 18:53:53 -0700
committerLinus Torvalds <>2021-07-01 11:06:03 -0700
commitffd8f251f1a61e592aa3146d2c3cfb6a992e80f2 (patch)
tree1de4d32e1505a38e0c287f981c90a0b001975929 /mm/internal.h
parentd01079f3d0c0a9e306ffbdb2694c5281bd9e065e (diff)
mm/page_alloc: move prototype for find_suitable_fallback
make W=1 generates the following warning in mmap_lock.c for allnoconfig mm/page_alloc.c:2670:5: warning: no previous prototype for `find_suitable_fallback' [-Wmissing-prototypes] int find_suitable_fallback(struct free_area *area, unsigned int order, ^~~~~~~~~~~~~~~~~~~~~~ find_suitable_fallback is only shared outside of page_alloc.c for CONFIG_COMPACTION but to suppress the warning, move the protype outside of CONFIG_COMPACTION. It is not worth the effort at this time to find a clever way of allowing compaction.c to share the code or avoid the use entirely as the function is called on relatively slow paths. Link: Signed-off-by: Mel Gorman <> Reviewed-by: Yang Shi <> Acked-by: Vlastimil Babka <> Cc: Dan Streetman <> Cc: David Hildenbrand <> Cc: Michal Hocko <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/internal.h')
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/internal.h b/mm/internal.h
index f38bc5d75ab7..2d7c9a2e0118 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -274,11 +274,10 @@ isolate_freepages_range(struct compact_control *cc,
isolate_migratepages_range(struct compact_control *cc,
unsigned long low_pfn, unsigned long end_pfn);
int find_suitable_fallback(struct free_area *area, unsigned int order,
int migratetype, bool only_stealable, bool *can_steal);
* This function returns the order of a free page in the buddy system. In
* general, page_zone(page)->lock must be held by the caller to prevent the