Re: [PATCH v7 4/6] mm: setup device page migration in HMM pagewalk

kernel test robot
2026-04-03T10:16:39Z

Hi,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 7aaa8047eafd0bd628065b15757d9b48c5f9c07d]

url: https://github.com/intel-lab-lkp/linux/commits/mpenttil-redhat-com/mm-Kconfig-changes-for-migrate-on-fault-for-device-pages/20260330-202258
base: 7aaa8047eafd0bd628065b15757d9b48c5f9c07d
patch link: https://lore.kernel.org/r/20260330115611.347988-5-mpenttil%40redhat.com
patch subject: [PATCH v7 4/6] mm: setup device page migration in HMM pagewalk
config: x86_64-rhel-9.4-kselftests (https://download.01.org/0day-ci/archive/20260403/202604031253.Wm8UgWnQ-lkp@intel.com/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/20260403/202604031253.Wm8UgWnQ-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604031253.Wm8UgWnQ-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> mm/migrate_device.c:508:13: warning: 'migrate_vma_collect' defined but not used [-Wunused-function]
508 | static void migrate_vma_collect(struct migrate_vma *migrate)
| ^~~~~~~~~~~~~~~~~~~

vim +/migrate_vma_collect +508 mm/migrate_device.c

76cbbead253ddca Christoph Hellwig 2022-02-16 499
76cbbead253ddca Christoph Hellwig 2022-02-16 500 /*
76cbbead253ddca Christoph Hellwig 2022-02-16 501 * migrate_vma_collect() - collect pages over a range of virtual addresses
76cbbead253ddca Christoph Hellwig 2022-02-16 502 * @migrate: migrate struct containing all migration information
76cbbead253ddca Christoph Hellwig 2022-02-16 503 *
76cbbead253ddca Christoph Hellwig 2022-02-16 504 * This will walk the CPU page table. For each virtual address backed by a
76cbbead253ddca Christoph Hellwig 2022-02-16 505 * valid page, it updates the src array and takes a reference on the page, in
76cbbead253ddca Christoph Hellwig 2022-02-16 506 * order to pin the page until we lock it and unmap it.
76cbbead253ddca Christoph Hellwig 2022-02-16 507 */
76cbbead253ddca Christoph Hellwig 2022-02-16 @508 static void migrate_vma_collect(struct migrate_vma *migrate)
76cbbead253ddca Christoph Hellwig 2022-02-16 509 {
76cbbead253ddca Christoph Hellwig 2022-02-16 510 struct mmu_notifier_range range;
76cbbead253ddca Christoph Hellwig 2022-02-16 511
76cbbead253ddca Christoph Hellwig 2022-02-16 512 /*
76cbbead253ddca Christoph Hellwig 2022-02-16 513 * Note that the pgmap_owner is passed to the mmu notifier callback so
76cbbead253ddca Christoph Hellwig 2022-02-16 514 * that the registered device driver can skip invalidating device
76cbbead253ddca Christoph Hellwig 2022-02-16 515 * private page mappings that won't be migrated.
76cbbead253ddca Christoph Hellwig 2022-02-16 516 */
76cbbead253ddca Christoph Hellwig 2022-02-16 517 mmu_notifier_range_init_owner(&range, MMU_NOTIFY_MIGRATE, 0,
7d4a8be0c4b2b7f Alistair Popple 2023-01-10 518 migrate->vma->vm_mm, migrate->start, migrate->end,
76cbbead253ddca Christoph Hellwig 2022-02-16 519 migrate->pgmap_owner);
76cbbead253ddca Christoph Hellwig 2022-02-16 520 mmu_notifier_invalidate_range_start(&range);
76cbbead253ddca Christoph Hellwig 2022-02-16 521
76cbbead253ddca Christoph Hellwig 2022-02-16 522 walk_page_range(migrate->vma->vm_mm, migrate->start, migrate->end,
76cbbead253ddca Christoph Hellwig 2022-02-16 523 &migrate_vma_walk_ops, migrate);
76cbbead253ddca Christoph Hellwig 2022-02-16 524
76cbbead253ddca Christoph Hellwig 2022-02-16 525 mmu_notifier_invalidate_range_end(&range);
76cbbead253ddca Christoph Hellwig 2022-02-16 526 migrate->end = migrate->start + (migrate->npages << PAGE_SHIFT);
76cbbead253ddca Christoph Hellwig 2022-02-16 527 }
76cbbead253ddca Christoph Hellwig 2022-02-16 528

--
0-DAY CI Kernel Test Service