Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
Cc: SeongJae Park <sj@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	damon@lists.linux.dev, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: [RFC PATCH v1.2 07/14] mm/damon/core: hide damon_destroy_region()
Date: Thu, 21 May 2026 07:34:17 -0700	[thread overview]
Message-ID: <20260521143428.83157-8-sj@kernel.org> (raw)
In-Reply-To: <20260521143428.83157-1-sj@kernel.org>

damon_destroy_region() is being used by only DAMON core, but exposed to
DAMON API callers.  Exposing something that is not really being used by
others will only increase the maintenance cost.  Hide it.

Signed-off-by: SeongJae Park <sj@kernel.org>
---
 include/linux/damon.h | 1 -
 mm/damon/core.c       | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/damon.h b/include/linux/damon.h
index 3acca7deb1693..638ee65f88dcb 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -1013,7 +1013,6 @@ void damon_add_probe(struct damon_ctx *ctx, struct damon_probe *probe);
 
 struct damon_region *damon_new_region(unsigned long start, unsigned long end);
 
-void damon_destroy_region(struct damon_region *r, struct damon_target *t);
 int damon_set_regions(struct damon_target *t, struct damon_addr_range *ranges,
 		unsigned int nr_ranges, unsigned long min_region_sz);
 void damon_update_region_access_rate(struct damon_region *r, bool accessed,
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 53b4bdd27b39d..8a9202937781c 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -291,7 +291,8 @@ static void damon_free_region(struct damon_region *r)
 	kmem_cache_free(damon_region_cache, r);
 }
 
-void damon_destroy_region(struct damon_region *r, struct damon_target *t)
+static void damon_destroy_region(struct damon_region *r,
+		struct damon_target *t)
 {
 	damon_del_region(r, t);
 	damon_free_region(r);
-- 
2.47.3


  parent reply	other threads:[~2026-05-21 14:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 14:34 [RFC PATCH v1.2 00/14] mm/damon: minor improvements for code readability and tests SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 01/14] mm/damon/core: safely handle no region case in damon_set_regions() SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 02/14] mm/damon/core: do not use region out of a loop " SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 03/14] samples/damon/mtier: replace damon_add_region() with damon_set_regions() SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 04/14] mm/damon/tests/vaddr-kunit: " SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 05/14] mm/damon/core: hide damon_add_region() SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 06/14] mm/damon/core: hide damon_insert_region() SeongJae Park
2026-05-21 14:34 ` SeongJae Park [this message]
2026-05-21 14:34 ` [RFC PATCH v1.2 08/14] mm/damon/core: add kdamond_call() debug_sanity check SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 09/14] mm/damon/core: remove damon_verify_nr_regions() SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 10/14] mm/damon/tests/core-kunit: add damon_set_regions() test cases SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 11/14] selftests/damon/sysfs.py: stop kdamonds before failing SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 12/14] selftests/damon/sysfs.sh: test monitoring intervals goal dir SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 13/14] selftests/damon/sysfs.sh: test addr_unit file existence SeongJae Park
2026-05-21 14:34 ` [RFC PATCH v1.2 14/14] selftests/damon/sysfs.sh: test pause " SeongJae 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=20260521143428.83157-8-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=damon@lists.linux.dev \
    --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