[PATCH 13/14] mm/page_alloc: Move prototype for find_suitable_fallback

From
Mel Gorman <hidden>
Date
2021-05-20 08:50:42
Also in
lkml
Reply to
Mel Gorman, 2021-05-20
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.

Signed-off-by: Mel Gorman <redacted>
---
 mm/internal.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mm/internal.h b/mm/internal.h
index 54bd0dc2c23c..bc9890948712 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -289,11 +289,10 @@ isolate_freepages_range(struct compact_control *cc,
 int
 isolate_migratepages_range(struct compact_control *cc,
 			   unsigned long low_pfn, unsigned long end_pfn);
+#endif
 int find_suitable_fallback(struct free_area *area, unsigned int order,
 			int migratetype, bool only_stealable, bool *can_steal);
 
-#endif
-
 /*
  * 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
-- 
2.26.2

Thread (23 messages) 23 messages, 6 authors, last reply 2021-07-09
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help