Re: [PATCH v2 2/2] mm/damon/core: Copy only installed probe in damon_split_region_at()

From: kernel test robot

Date: Fri Oct 09 2026 - 00:08:46 EST


Hi Suhaas,

kernel test robot noticed the following build errors:

[auto build test ERROR on akpm-mm/mm-everything]

url: https://github.com/intel-lab-lkp/linux/commits/Suhaas-Joshi/mm-damon-core-Copy-only-installed-probe-in-damon_split_region_at/20261008-204926
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20261008151944.113714-3-suhaas%40s-joshi.in
patch subject: [PATCH v2 2/2] mm/damon/core: Copy only installed probe in damon_split_region_at()
config: x86_64-randconfig-1000-20261009 (https://download.01.org/0day-ci/archive/20261009/202610091227.PIPVB0PW-lkp@xxxxxxxxx/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261009/202610091227.PIPVB0PW-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202610091227.PIPVB0PW-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

In file included from mm/damon/core.c:4295:
mm/damon/tests/core-kunit.h: In function 'damon_test_last_region_quota_reset':
mm/damon/tests/core-kunit.h:2519:45: error: passing argument 1 of 'damos_skip_charged_region' from incompatible pointer type [-Wincompatible-pointer-types]
2519 | skipped = damos_skip_charged_region(t, r2, &s, min_region_sz);
| ^
| |
| struct damon_target *
mm/damon/core.c:2500:57: note: expected 'struct damon_ctx *' but argument is of type 'struct damon_target *'
2500 | static bool damos_skip_charged_region(struct damon_ctx *ctx,
| ~~~~~~~~~~~~~~~~~~^~~
mm/damon/tests/core-kunit.h:2519:48: error: passing argument 2 of 'damos_skip_charged_region' from incompatible pointer type [-Wincompatible-pointer-types]
2519 | skipped = damos_skip_charged_region(t, r2, &s, min_region_sz);
| ^~
| |
| struct damon_region *
mm/damon/core.c:2501:60: note: expected 'struct damon_target *' but argument is of type 'struct damon_region *'
2501 | struct damon_target *t,
| ~~~~~~~~~~~~~~~~~~~~~^
mm/damon/tests/core-kunit.h:2519:52: error: passing argument 3 of 'damos_skip_charged_region' from incompatible pointer type [-Wincompatible-pointer-types]
2519 | skipped = damos_skip_charged_region(t, r2, &s, min_region_sz);
| ^~
| |
| struct damos *
mm/damon/core.c:2502:60: note: expected 'struct damon_region *' but argument is of type 'struct damos *'
2502 | struct damon_region *r, struct damos *s,
| ~~~~~~~~~~~~~~~~~~~~~^
>> mm/damon/tests/core-kunit.h:2519:56: error: passing argument 4 of 'damos_skip_charged_region' makes pointer from integer without a cast [-Wint-conversion]
2519 | skipped = damos_skip_charged_region(t, r2, &s, min_region_sz);
| ^~~~~~~~~~~~~
| |
| long unsigned int
mm/damon/core.c:2502:77: note: expected 'struct damos *' but argument is of type 'long unsigned int'
2502 | struct damon_region *r, struct damos *s,
| ~~~~~~~~~~~~~~^
mm/damon/tests/core-kunit.h:2519:19: error: too few arguments to function 'damos_skip_charged_region'
2519 | skipped = damos_skip_charged_region(t, r2, &s, min_region_sz);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
mm/damon/core.c:2500:13: note: declared here
2500 | static bool damos_skip_charged_region(struct damon_ctx *ctx,
| ^~~~~~~~~~~~~~~~~~~~~~~~~


vim +/damos_skip_charged_region +2519 mm/damon/tests/core-kunit.h

79500f5843f453 Donggeun Yoo 2026-09-28 2489
18793c04abe665 Liew Rui Yan 2026-10-05 2490 static void damon_test_last_region_quota_reset(struct kunit *test)
18793c04abe665 Liew Rui Yan 2026-10-05 2491 {
18793c04abe665 Liew Rui Yan 2026-10-05 2492 struct damos s = {0};
18793c04abe665 Liew Rui Yan 2026-10-05 2493 struct damon_target *t;
18793c04abe665 Liew Rui Yan 2026-10-05 2494 struct damon_region *r1, *r2;
18793c04abe665 Liew Rui Yan 2026-10-05 2495 unsigned long min_region_sz = 1;
18793c04abe665 Liew Rui Yan 2026-10-05 2496 bool skipped;
18793c04abe665 Liew Rui Yan 2026-10-05 2497
18793c04abe665 Liew Rui Yan 2026-10-05 2498 t = damon_new_target();
18793c04abe665 Liew Rui Yan 2026-10-05 2499 if (!t)
18793c04abe665 Liew Rui Yan 2026-10-05 2500 kunit_skip(test, "target alloc fail");
18793c04abe665 Liew Rui Yan 2026-10-05 2501
18793c04abe665 Liew Rui Yan 2026-10-05 2502 r1 = damon_new_region(0, 100);
18793c04abe665 Liew Rui Yan 2026-10-05 2503 if (!r1) {
18793c04abe665 Liew Rui Yan 2026-10-05 2504 damon_free_target(t);
18793c04abe665 Liew Rui Yan 2026-10-05 2505 kunit_skip(test, "region 1 alloc fail");
18793c04abe665 Liew Rui Yan 2026-10-05 2506 }
18793c04abe665 Liew Rui Yan 2026-10-05 2507 damon_add_region(r1, t);
18793c04abe665 Liew Rui Yan 2026-10-05 2508
18793c04abe665 Liew Rui Yan 2026-10-05 2509 r2 = damon_new_region(100, 200);
18793c04abe665 Liew Rui Yan 2026-10-05 2510 if (!r2) {
18793c04abe665 Liew Rui Yan 2026-10-05 2511 damon_free_target(t);
18793c04abe665 Liew Rui Yan 2026-10-05 2512 kunit_skip(test, "region 2 alloc fail");
18793c04abe665 Liew Rui Yan 2026-10-05 2513 }
18793c04abe665 Liew Rui Yan 2026-10-05 2514 damon_add_region(r2, t);
18793c04abe665 Liew Rui Yan 2026-10-05 2515
18793c04abe665 Liew Rui Yan 2026-10-05 2516 s.quota.charge_target_from = t;
18793c04abe665 Liew Rui Yan 2026-10-05 2517 s.quota.charge_addr_from = r1->ar.end;
18793c04abe665 Liew Rui Yan 2026-10-05 2518
18793c04abe665 Liew Rui Yan 2026-10-05 @2519 skipped = damos_skip_charged_region(t, r2, &s, min_region_sz);
18793c04abe665 Liew Rui Yan 2026-10-05 2520
18793c04abe665 Liew Rui Yan 2026-10-05 2521 /* 'r2' is not processed, it should not skip */
18793c04abe665 Liew Rui Yan 2026-10-05 2522 KUNIT_EXPECT_EQ(test, skipped, false);
18793c04abe665 Liew Rui Yan 2026-10-05 2523
18793c04abe665 Liew Rui Yan 2026-10-05 2524 /* 'r2' is last region, it should reset charge_{target,addr}_from */
18793c04abe665 Liew Rui Yan 2026-10-05 2525 KUNIT_EXPECT_PTR_EQ(test, s.quota.charge_target_from, NULL);
18793c04abe665 Liew Rui Yan 2026-10-05 2526 KUNIT_EXPECT_EQ(test, s.quota.charge_addr_from, 0);
18793c04abe665 Liew Rui Yan 2026-10-05 2527
18793c04abe665 Liew Rui Yan 2026-10-05 2528 damon_free_target(t);
18793c04abe665 Liew Rui Yan 2026-10-05 2529 }
18793c04abe665 Liew Rui Yan 2026-10-05 2530

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki