summaryrefslogtreecommitdiff
path: root/mm/damon/dbgfs.c
diff options
context:
space:
mode:
authorKaixu Xia <kaixuxia@tencent.com>2022-09-16 18:20:35 +0300
committerAndrew Morton <akpm@linux-foundation.org>2022-10-04 00:03:27 +0300
commitcc713520bdc1b84fc5394f6ac8649b93ad2c5dde (patch)
tree12000cacb6abf5d50169748193aae103bcb4f4c7 /mm/damon/dbgfs.c
parent1ea41595f606e21ba422c59dcdc637f9a9513f2e (diff)
downloadlinux-cc713520bdc1b84fc5394f6ac8649b93ad2c5dde.tar.xz
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/dbgfs.c')
-rw-r--r--mm/damon/dbgfs.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c
index c00eba4448d8..6f0ae7d3ae39 100644
--- a/mm/damon/dbgfs.c
+++ b/mm/damon/dbgfs.c
@@ -307,11 +307,9 @@ static ssize_t dbgfs_schemes_write(struct file *file, const char __user *buf,
goto unlock_out;
}
- ret = damon_set_schemes(ctx, schemes, nr_schemes);
- if (!ret) {
- ret = count;
- nr_schemes = 0;
- }
+ damon_set_schemes(ctx, schemes, nr_schemes);
+ ret = count;
+ nr_schemes = 0;
unlock_out:
mutex_unlock(&ctx->kdamond_lock);