Re: [PATCH] mm/damon/core: use list_{next,prev}_entry() in damon_{next,prev}_region()

From: Aveline Noir

Date: Tue Nov 03 2026 - 07:34:54 EST


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?

Thanks,
Aveline Noir