diff options
author | Kaixu Xia <kaixuxia@tencent.com> | 2022-09-16 17:20:35 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-10-03 23:03:27 +0200 |
commit | cc713520bdc1b84fc5394f6ac8649b93ad2c5dde (patch) | |
tree | 12000cacb6abf5d50169748193aae103bcb4f4c7 /mm/damon/reclaim.c | |
parent | mm/secretmem: add __init annotation to secretmem_init() (diff) | |
download | linux-cc713520bdc1b84fc5394f6ac8649b93ad2c5dde.tar.xz linux-cc713520bdc1b84fc5394f6ac8649b93ad2c5dde.zip |
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/reclaim.c')
-rw-r--r-- | mm/damon/reclaim.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c index 039fa55e0ae9..3d59ab11b7b3 100644 --- a/mm/damon/reclaim.c +++ b/mm/damon/reclaim.c @@ -155,9 +155,7 @@ static int damon_reclaim_apply_parameters(void) scheme = damon_reclaim_new_scheme(); if (!scheme) return -ENOMEM; - err = damon_set_schemes(ctx, &scheme, 1); - if (err) - return err; + damon_set_schemes(ctx, &scheme, 1); if (monitor_region_start > monitor_region_end) return -EINVAL; |