
hulk inclusion category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBDTU7 -------------------------------- Commit 310d6c15e910 ("mm/damon/core: merge regions aggressively when max_nr_regions is unmet"), fix the compilation warning caused by the max comparison in kdamond_merge_regions. Fixes: 310d6c15e910 ("mm/damon/core: merge regions aggressively when max_nr_regions is unmet") Signed-off-by: Ze Zuo <zuoze1@huawei.com> --- mm/damon/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/damon/core.c b/mm/damon/core.c index 13d0e70d2add..0158c352d9ec 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -992,7 +992,7 @@ static void kdamond_merge_regions(struct damon_ctx *c, unsigned int threshold, damon_merge_regions_of(t, threshold, sz_limit); nr_regions += damon_nr_regions(t); } - threshold = max(1, threshold * 2); + threshold = max(1u, threshold * 2); } while (nr_regions > c->attrs.max_nr_regions && threshold / 2 < max_thres); } -- 2.25.1