Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
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
Subject: [PATCH 11/11] mm/damon/sysfs: fix typos in probe_{add,rm}_dirs: s/attr/probe/
Date: Tue, 30 Jun 2026 07:17:25 -0700	[thread overview]
Message-ID: <20260630141726.92246-12-sj@kernel.org> (raw)
In-Reply-To: <20260630141726.92246-1-sj@kernel.org>

damon_sysfs_probe_{add,rm}_dirs names a variable for damon_sysf_probe
as 'attr'.  Probably a trivial copy-pasta error, but it makes the code
not pleasant to read.  Fix those.

Signed-off-by: SJ Park <sj@kernel.org>
---
 mm/damon/sysfs.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/mm/damon/sysfs.c b/mm/damon/sysfs.c
index 5b2ae2fe948fa..6710b6d019bf5 100644
--- a/mm/damon/sysfs.c
+++ b/mm/damon/sysfs.c
@@ -1073,7 +1073,7 @@ static struct damon_sysfs_probe *damon_sysfs_probe_alloc(void)
 	return kzalloc_obj(struct damon_sysfs_probe);
 }
 
-static int damon_sysfs_probe_add_dirs(struct damon_sysfs_probe *attr)
+static int damon_sysfs_probe_add_dirs(struct damon_sysfs_probe *probe)
 {
 	struct damon_sysfs_filters *filters;
 	int err;
@@ -1081,22 +1081,22 @@ static int damon_sysfs_probe_add_dirs(struct damon_sysfs_probe *attr)
 	filters = damon_sysfs_filters_alloc();
 	if (!filters)
 		return -ENOMEM;
-	attr->filters = filters;
+	probe->filters = filters;
 
 	err = kobject_init_and_add(&filters->kobj, &damon_sysfs_filters_ktype,
-			&attr->kobj, "filters");
+			&probe->kobj, "filters");
 	if (err) {
 		kobject_put(&filters->kobj);
-		attr->filters = NULL;
+		probe->filters = NULL;
 	}
 	return err;
 }
 
-static void damon_sysfs_probe_rm_dirs(struct damon_sysfs_probe *attr)
+static void damon_sysfs_probe_rm_dirs(struct damon_sysfs_probe *probe)
 {
-	if (attr->filters) {
-		damon_sysfs_filters_rm_dirs(attr->filters);
-		kobject_put(&attr->filters->kobj);
+	if (probe->filters) {
+		damon_sysfs_filters_rm_dirs(probe->filters);
+		kobject_put(&probe->filters->kobj);
 	}
 }
 
-- 
2.47.3


  parent reply	other threads:[~2026-06-30 14:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 14:17 [PATCH 00/11] mm/damon: update, optimize, and clean up doc, tests, and code SJ Park
2026-06-30 14:17 ` [PATCH 01/11] Docs/mm/damon/design: update for DAMOS_QUOTA_NODE_ELIGIBLE_MEM_BP SJ Park
2026-06-30 14:17 ` [PATCH 02/11] Docs/ABI/damon: document probe files SJ Park
2026-06-30 14:17 ` [PATCH 03/11] mm/damon/tests/core-kunit: test damon_rand() SJ Park
2026-06-30 14:17 ` [PATCH 04/11] selftests/damon/sysfs.sh: test multiple probe dirs creation SJ Park
2026-06-30 14:17 ` [PATCH 05/11] selftests/damon/sysfs.sh: test {core,ops}_filters/ directories SJ Park
2026-06-30 14:17 ` [PATCH 06/11] selftests/damon/sysfs.sh: test dests dir SJ Park
2026-06-30 14:17 ` [PATCH 07/11] selftests/damon/sysfs.sh: test all files in quota goal dir SJ Park
2026-06-30 14:17 ` [PATCH 08/11] mm/damon/core: reduce range setup in damon_commit_target_regions() SJ Park
2026-06-30 14:17 ` [PATCH 09/11] mm/damon/sysfs: split probe setup function out SJ Park
2026-06-30 14:17 ` [PATCH 10/11] mm/damon/sysfs: split out filters setup function SJ Park
2026-06-30 14:17 ` SJ Park [this message]
2026-06-30 14:57 ` [PATCH 00/11] mm/damon: update, optimize, and clean up doc, tests, and code 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=20260630141726.92246-12-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