Re: [PATCH 03/12] mm/damon/vaddr: remove a debug message
From: Kunwu Chan
Date: Wed Sep 02 2026 - 22:31:19 EST
On Tue, 1 Sep 2026 22:47:36 -0700 SJ Park <sj@xxxxxxxxxx> wrote:
> There is a debug message in the DAMON virtual address space operation
> set. It has not really been used in a meaningful way for the last few
> years, though. Remove it.
>
> Signed-off-by: SJ Park <sj@xxxxxxxxxx>
> ---
> mm/damon/vaddr.c | 16 +++-------------
> 1 file changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
> index c8c32b2ae0402..f884d3f78f30a 100644
> --- a/mm/damon/vaddr.c
> +++ b/mm/damon/vaddr.c
> @@ -189,22 +189,12 @@ static int damon_va_three_regions(struct damon_target *t,
> * <BIG UNMAPPED REGION 2>
> * <stack>
> */
> -static void __damon_va_init_regions(struct damon_ctx *ctx,
> - struct damon_target *t)
> +static void __damon_va_init_regions(struct damon_target *t)
> {
> - struct damon_target *ti;
> struct damon_addr_range regions[3];
> - int tidx = 0;
>
> - if (damon_va_three_regions(t, regions)) {
> - damon_for_each_target(ti, ctx) {
Thanks for the cleanup. The debug message was the only user of
ctx here, so the signature cleanup follows naturally.
Reviewed-by: Kunwu Chan <kunwu.chan@xxxxxxxxx>
Thanks,
Kunwu
> - if (ti == t)
> - break;
> - tidx++;
> - }
> - pr_debug("Failed to get three regions of %dth target\n", tidx);
> + if (damon_va_three_regions(t, regions))
> return;
> - }
>
> damon_set_regions(t, regions, 3, DAMON_MIN_REGION_SZ);
> }
> @@ -217,7 +207,7 @@ static void damon_va_init(struct damon_ctx *ctx)
> damon_for_each_target(t, ctx) {
> /* the user may set the target regions as they want */
> if (!damon_nr_regions(t))
> - __damon_va_init_regions(ctx, t);
> + __damon_va_init_regions(t);
> }
> }
>
> --
> 2.47.3
>
Sent using hkml (https://github.com/sjp38/hackermail)