summaryrefslogtreecommitdiff
path: root/mm/damon/core.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/core.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/core.c')
-rw-r--r--mm/damon/core.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/damon/core.c b/mm/damon/core.c
index a843673c11cf..9c80c6eb00c2 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -454,10 +454,8 @@ int damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs)
*
* This function should not be called while the kdamond of the context is
* running.
- *
- * Return: 0 if success, or negative error code otherwise.
*/
-int damon_set_schemes(struct damon_ctx *ctx, struct damos **schemes,
+void damon_set_schemes(struct damon_ctx *ctx, struct damos **schemes,
ssize_t nr_schemes)
{
struct damos *s, *next;
@@ -467,7 +465,6 @@ int damon_set_schemes(struct damon_ctx *ctx, struct damos **schemes,
damon_destroy_scheme(s);
for (i = 0; i < nr_schemes; i++)
damon_add_scheme(ctx, schemes[i]);
- return 0;
}
/**