From: SJ Park <sj@kernel.org>
To: Aveline Noir <jm5905938@gmail.com>
Cc: SJ Park <sj@kernel.org>, Enze Li <lienze@kylinos.cn>,
damon@lists.linux.dev, enze.li@gmx.com,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm/damon/core: use list_{next,prev}_entry() in damon_{next,prev}_region()
Date: Tue, 3 Nov 2026 06:45:32 -0800 [thread overview]
Message-ID: <20261103144533.87946-1-sj@kernel.org> (raw)
In-Reply-To: <179370190119.71013.18301574509097172702.b4-reply@b4>
On Tue, 03 Nov 2026 21:31:41 +1100 Aveline Noir <jm5905938@gmail.com> wrote:
> Hi Enze,
>
> On Tue, 03 Nov 2026 18:07:14 +0800 Enze Li wrote:
>
> > damon_next_region() and damon_prev_region() manually do container_of()
> > type casting to fetch the next and previous region from the linked
> > list. Use the dedicated list.h helpers, list_next_entry() and
> > list_prev_entry(), as damon_first_region() and damon_last_region() do.
>
> The change looks correct to me. list_{next,prev}_entry() expand to the
> same container_of() calls, so there is no functional change.
>
> That said, my understanding is that the kernel generally discourages
> changes made only for coding style, outside of other work on the same
> code. Documentation/process/4.Coding.rst notes that "pure coding style
> fixes are seen as noise by the development community".
>
> SJ, what do you think about this kind of cleanup for DAMON?
I think whether it is noise or not depend on each change and the volume of
traffic. Let's suppose a patch for a real trivial change and there are many
patches for critical bug fixes waiting for reviews. In the case, I think the
trivial patch should be deprioritized, and we should discourage sending such
patches while the urgent reviews are done. If there are bandiwdth for review,
it is no problem. Nonetheless, I would dislike patches that making only
trivial cosmetic changes that doesn't really improve maintainability.
I feel like we have review bandwidth now, and this change looks like a
meaningful code maintainability improvement to me.
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-11-03 14:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 10:07 Enze Li
2026-11-03 10:31 ` Aveline Noir
2026-11-03 14:45 ` SJ Park [this message]
2026-11-03 14:36 ` 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=20261103144533.87946-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=damon@lists.linux.dev \
--cc=enze.li@gmx.com \
--cc=jm5905938@gmail.com \
--cc=lienze@kylinos.cn \
--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
all inboxes | Powered by JetHome®