mm/damon/lru_sort: remove duplicated min_region_sz power_of_2() check

DAMON_LRU_SORT validates the user input for min_region_sz.  The same
validation is done inside damon_start() and damon_commit_ctx().  Remove
the unnecessary duplicate.

Link: https://lore.kernel.org/20260705155600.96555-6-sj@kernel.org
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
SJ Park
2026-07-05 08:55:56 -07:00
committed by Andrew Morton
parent 529ba07482
commit cf4b20f9f9

View File

@@ -284,11 +284,6 @@ static int damon_lru_sort_apply_parameters(void)
param_ctx->addr_unit = addr_unit;
param_ctx->min_region_sz = max(DAMON_MIN_REGION_SZ / addr_unit, 1);
if (!is_power_of_2(param_ctx->min_region_sz)) {
err = -EINVAL;
goto out;
}
if (!damon_lru_sort_mon_attrs.sample_interval) {
err = -EINVAL;
goto out;