Re: [PATCH 1/1] mm/damon/core: Remove unnecessary zero-initialization in damon_new_ctx()
From: SJ Park
Date: Fri Oct 16 2026 - 11:17:37 EST
Hello Adrian,
Let's use lowercase for the first word of the subject (s/Remove/remove/), as
that's the convention in mm.
On Fri, 16 Oct 2026 22:37:33 +0800 "Adrian Huang (Lenovo)" <adrianhuang0701@xxxxxxxxx> wrote:
> damon_new_ctx() allocates the context structure using kzalloc(),
> which already initializes all fields to zero.
>
> The explicit initialization of passed_sample_intervals,
> next_aggregation_sis, and next_ops_update_sis is therefore redundant.
> In addition, they are later initialized by kdamond_init_ctx() before use.
>
> Remove the unnecessary assignments to simplify the code.
Makes sense, thank you for this patch.
>
> Signed-off-by: Adrian Huang (Lenovo) <adrianhuang0701@xxxxxxxxx>
Reviewed-by: SJ Park <sj@xxxxxxxxxx>
I applied this patch to damon/next [1] tree after adjusting the subject as I
abovely mentioned. Let me know if you dislike the change. We are now quite
close to next merge window. It may better to focus on making mm.git more
stabilized and therefore ready for the next merge window, rather than adding
more changes that are not really urgent. I understand this series is not
really urgent. Hence, Andrew might not add this patch until next -rc1 release.
In the case, I will request adding this to mm.git after next -rc1 release. So,
no action from your side is needed for now. Let me know if you think this is
really urgent.
[1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees
Thanks,
SJ
[...]