From: SJ Park <sj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: SJ Park <sj@kernel.org>,
damon@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Cheng-Han Wu <hank20010209@gmail.com>
Subject: [PATCH v2 1/2] mm/damon/core: remove unused damon_targets_empty()
Date: Mon, 31 Aug 2026 07:57:21 -0700 [thread overview]
Message-ID: <20260831145724.82387-2-sj@kernel.org> (raw)
In-Reply-To: <20260831145724.82387-1-sj@kernel.org>
damon_targets_empty() has had no in-tree users since commit
5ec4333b1967 ("mm/damon: remove DAMON debugfs interface") removed
its last caller.
Remove the unused declaration and definition.
Signed-off-by: Cheng-Han Wu <hank20010209@gmail.com>
Reviewed-by: SJ Park <sj@kernel.org>
Signed-off-by: SJ Park <sj@kernel.org>
---
include/linux/damon.h | 1 -
mm/damon/core.c | 5 -----
2 files changed, 6 deletions(-)
diff --git a/include/linux/damon.h b/include/linux/damon.h
index 310509455db13..9835b864a8db9 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -1056,7 +1056,6 @@ int damos_commit_quota_goals(struct damos_quota *dst, struct damos_quota *src);
struct damon_target *damon_new_target(void);
void damon_add_target(struct damon_ctx *ctx, struct damon_target *t);
-bool damon_targets_empty(struct damon_ctx *ctx);
int damon_set_target_pid(struct damon_target *t, int pid);
void damon_free_target(struct damon_target *t);
void damon_destroy_target(struct damon_target *t, struct damon_ctx *ctx);
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 3fa1b096c8330..043eb38de5fd3 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -798,11 +798,6 @@ void damon_add_target(struct damon_ctx *ctx, struct damon_target *t)
list_add_tail(&t->list, &ctx->adaptive_targets);
}
-bool damon_targets_empty(struct damon_ctx *ctx)
-{
- return list_empty(&ctx->adaptive_targets);
-}
-
/*
* Assign the struct pid of the given pid number to the given target.
*/
--
2.47.3
next prev parent reply other threads:[~2026-08-31 14:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 14:57 [PATCH v2 0/2] mm/damon/core: remove unused helper functions SJ Park
2026-08-31 14:57 ` SJ Park [this message]
2026-08-31 23:19 ` [PATCH v2 1/2] mm/damon/core: remove unused damon_targets_empty() Andrew Morton
2026-09-01 0:42 ` SJ Park
2026-08-31 14:57 ` [PATCH v2 2/2] mm/damon/core: remove unused damon_nr_running_ctxs() SJ Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260831145724.82387-2-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=hank20010209@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox