mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 18:03:10 -04:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user