[PATCH 7/8] mm/damon/core: remove start, end check in damon_set_region_system_rams()
From: SJ Park
Date: Sun Jul 05 2026 - 11:58:50 EST
damon_set_region_system_rams() validates user inputs to avoid creating a
negative size region. But DAMON core avoids zero size, too. The check
is incomplete. The complete check is done inside damon_set_regions(),
which is eventually called from damon_set_region_system_rams_default().
Drop the incomplete and unnecessary check.
Signed-off-by: SJ Park <sj@xxxxxxxxxx>
---
mm/damon/core.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/mm/damon/core.c b/mm/damon/core.c
index ca301abcb9ec5..3c5a46e1c079a 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -3846,9 +3846,6 @@ int damon_set_region_system_rams_default(struct damon_target *t,
{
struct damon_addr_range addr_range;
- if (*start > *end)
- return -EINVAL;
-
if (!*start && !*end &&
!damon_find_system_rams_range(start, end, addr_unit))
return -EINVAL;
--
2.47.3