Skip to content

Commit 6c38261

Browse files
bjackmanakpm00
authored andcommitted
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 <jackmanb@google.com> Reviewed-by: Zi Yan <ziy@nvidia.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent ef49b7b commit 6c38261

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
@@ -4182,7 +4182,7 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
41824182
}
41834183

41844184
static inline bool
4185-
should_compact_retry(struct alloc_context *ac, unsigned int order, int alloc_flags,
4185+
should_compact_retry(struct alloc_context *ac, int order, int alloc_flags,
41864186
enum compact_result compact_result,
41874187
enum compact_priority *compact_priority,
41884188
int *compaction_retries)

0 commit comments

Comments
 (0)