From: Brendan Jackman Date: Tue, 26 Aug 2025 14:06:54 +0000 (+0000) Subject: mm/page_alloc: harmonize should_compact_retry() type X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=eedc1900aa8282f0fcd372b4d582f3231a963164;p=users%2Fjedix%2Flinux-maple.git mm/page_alloc: harmonize should_compact_retry() type Currently order is signed in one version of the function and unsigned in the other. Tidy that up. In page_alloc.c, order is unsigned in the vast majority of cases. But, there is a cluster of exceptions in compaction-related code (probably stemming from the fact that compact_control.order is signed). So, prefer local consistency and make this one signed too. Link: https://lkml.kernel.org/r/20250826-cleanup-should_compact_retry-v1-1-d2ca89727fcf@google.com Signed-off-by: Brendan Jackman Reviewed-by: Zi Yan Cc: Johannes Weiner Cc: Michal Hocko Cc: Suren Baghdasaryan Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index baead29b3e67b..3e37922635d53 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4182,7 +4182,7 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order, } static inline bool -should_compact_retry(struct alloc_context *ac, unsigned int order, int alloc_flags, +should_compact_retry(struct alloc_context *ac, int order, int alloc_flags, enum compact_result compact_result, enum compact_priority *compact_priority, int *compaction_retries)