mm/damon/core: change damon_stop() return type to void

damon_stop() always returns 0, and nobody cares.  Change the return type
to void.

Link: https://lore.kernel.org/20260706140628.87414-8-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:
SJ Park
2026-07-06 07:06:22 -07:00
committed by Andrew Morton
parent c8518b9713
commit a4d91b8254
2 changed files with 2 additions and 3 deletions

View File

@@ -1070,7 +1070,7 @@ static inline unsigned int damon_max_nr_accesses(const struct damon_attrs *attrs
bool damon_initialized(void);
int damon_start(struct damon_ctx **ctxs, int nr_ctxs, bool exclusive);
int damon_stop(struct damon_ctx **ctxs, int nr_ctxs);
void damon_stop(struct damon_ctx **ctxs, int nr_ctxs);
bool damon_is_running(struct damon_ctx *ctx);
int damon_kdamond_pid(struct damon_ctx *ctx);

View File

@@ -1947,14 +1947,13 @@ static void __damon_stop(struct damon_ctx *ctx)
* @ctxs: an array of the pointers for contexts to stop monitoring
* @nr_ctxs: size of @ctxs
*/
int damon_stop(struct damon_ctx **ctxs, int nr_ctxs)
void damon_stop(struct damon_ctx **ctxs, int nr_ctxs)
{
int i;
for (i = 0; i < nr_ctxs; i++)
/* nr_running_ctxs is decremented in kdamond_fn */
__damon_stop(ctxs[i]);
return 0;
}
/**