Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] mm: migrate: missing MIGRATE_VMA_SELECT_NONE under CONFIG_MIGRATION --
commit b1bec522cfd1d7118c74e979fcadbaa2b246dc13 Author: Mika Penttilä <[email protected]> mm/hmm: preparations for HMM to participate in migration This commit prepares HMM for migration by retrieving the VMA during page walks and ensuring the mmap_lock is held. It also renames some hmm_vma_walk fields to prevent namespace collisions. > diff --git a/include/linux/migrate.h b/include/linux/migrate.h > index 78424b3824c29..01c5f62a56e99 100644 > --- a/include/linux/migrate.h > +++ b/include/linux/migrate.h [ ... ] > @@ -150,7 +175,7 @@ static inline unsigned long migrate_pfn(unsigned long pfn) > return (pfn << MIGRATE_PFN_SHIFT) | MIGRATE_PFN_VALID; > } > > -enum migrate_vma_direction { > +enum migrate_vma_info { > MIGRATE_VMA_SELECT_SYSTEM = 1 << 0, > MIGRATE_VMA_SELECT_DEVICE_PRIVATE = 1 << 1, > MIGRATE_VMA_SELECT_DEVICE_COHERENT = 1 << 2, [Severity: Low] This is not a bug, but could we add MIGRATE_VMA_SELECT_NONE to this enum under CONFIG_MIGRATION? It looks like it is missing here, even though it is defined in the fallback block when CONFIG_MIGRATION is disabled. This is strictly a compile-time naming and style issue and has no runtime effect. Note that I initially thought MIGRATE_VMA_SELECT_COMPOUND was also missing, but I see it is correctly defined in the tree. [ ... ] > @@ -192,6 +217,29 @@ struct migrate_vma { > struct page *fault_page; > }; > > +// TODO: enable migration > +static inline enum migrate_vma_info hmm_select_migrate(struct hmm_range > *range) > +{ > + return 0; [Severity: Low] Does the missing MIGRATE_VMA_SELECT_NONE in the enum definition force this code to use a literal 0 as a workaround instead of a named enum value? Could we define MIGRATE_VMA_SELECT_NONE and use it here for better consistency? > +} -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
