Skip to content

Commit f717309

Browse files
gormanmtorvalds
authored andcommitted
mm/page_alloc: make should_fail_alloc_page() static
make W=1 generates the following warning for mm/page_alloc.c mm/page_alloc.c:3651:15: warning: no previous prototype for `should_fail_alloc_page' [-Wmissing-prototypes] noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order) ^~~~~~~~~~~~~~~~~~~~~~ This function is deliberately split out for BPF to allow errors to be injected. The function is not used anywhere else so it is local to the file. Make it static which should still allow error injection to be used similar to how block/blk-core.c:should_fail_bio() works. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Mel Gorman <[email protected]> Reviewed-by: Yang Shi <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Cc: Dan Streetman <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 5da96bd commit f717309

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3819,7 +3819,7 @@ static inline bool __should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
38193819

38203820
#endif /* CONFIG_FAIL_PAGE_ALLOC */
38213821

3822-
noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
3822+
static noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
38233823
{
38243824
return __should_fail_alloc_page(gfp_mask, order);
38253825
}

0 commit comments

Comments
 (0)