[RFC PATCH 7/8] mm/damon/core: remove start, end check in damon_set_region_system_rams()
From: SJ Park
Date: Wed Jul 01 2026 - 10:59:46 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 6b30cb6007e54..3caf1b67a7f98 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -3847,9 +3847,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