[PATCH] mm/damon/stat: fix wrong argument to damon_set_regions()
From: SeongJae Park
Date: Fri Mar 13 2026 - 19:41:00 EST
The third argument for damon_set_regions() is the number of ranges in
the second argument, but the code is wrongly passing addr_unit. Fix it.
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
mm/damon/stat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/damon/stat.c b/mm/damon/stat.c
index 3ed71db33e899..c5af8ad4bcb65 100644
--- a/mm/damon/stat.c
+++ b/mm/damon/stat.c
@@ -188,7 +188,7 @@ static int damon_stat_set_monitoring_region(struct damon_target *t,
arg.res.start, addr_unit);
addr_range.end = damon_stat_res_to_core_addr(
arg.res.end + 1, addr_unit);
- return damon_set_regions(t, &addr_range, addr_unit, min_region_sz);
+ return damon_set_regions(t, &addr_range, 1, min_region_sz);
}
static struct damon_ctx *damon_stat_build_ctx(void)
--
2.47.3