summaryrefslogtreecommitdiff
path: root/mm/damon/lru_sort.c
diff options
context:
space:
mode:
authorKaixu Xia <kaixuxia@tencent.com>2022-09-16 23:20:35 +0800
committerAndrew Morton <akpm@linux-foundation.org>2022-10-03 14:03:27 -0700
commitcc713520bdc1b84fc5394f6ac8649b93ad2c5dde (patch)
tree12000cacb6abf5d50169748193aae103bcb4f4c7 /mm/damon/lru_sort.c
parent1ea41595f606e21ba422c59dcdc637f9a9513f2e (diff)
mm/damon: return void from damon_set_schemes()
There is no point in returning an int from damon_set_schemes(). It always returns 0 which is meaningless for the caller, so change it to return void directly. Link: https://lkml.kernel.org/r/1663341635-12675-1-git-send-email-kaixuxia@tencent.com Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Reviewed-by: SeongJae Park <sj@kernel.org> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon/lru_sort.c')
-rw-r--r--mm/damon/lru_sort.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/damon/lru_sort.c b/mm/damon/lru_sort.c
index 4a40054ba03b..d7eb72b41cb6 100644
--- a/mm/damon/lru_sort.c
+++ b/mm/damon/lru_sort.c
@@ -203,9 +203,7 @@ static int damon_lru_sort_apply_parameters(void)
scheme = damon_lru_sort_new_hot_scheme(hot_thres);
if (!scheme)
return -ENOMEM;
- err = damon_set_schemes(ctx, &scheme, 1);
- if (err)
- return err;
+ damon_set_schemes(ctx, &scheme, 1);
cold_thres = cold_min_age / damon_lru_sort_mon_attrs.aggr_interval;
scheme = damon_lru_sort_new_cold_scheme(cold_thres);