From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: mm: Add helper to convert HMM pfn to migrate pfn Date: Mon, 25 May 2026 16:46:27 +1000 Message-ID: In-Reply-To: <20260525050830.100254-3-mpenttil@redhat.com> References: <20260525050830.100254-1-mpenttil@redhat.com> <20260525050830.100254-3-mpenttil@redhat.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review **Minor issues.** 1. **New flags consume bits from the order field.** The `HMM_PFN_ORDER_SHIFT` moves from `BITS_PER_LONG - 11` to `BITS_PER_LONG - 13`, reducing the available order bits from 5 to 5 (no change, since bits 7 and 8 are now flags). However, the two new flags (`HMM_PFN_MIGRATE` at bit 7, `HMM_PFN_COMPOUND` at bit 8) sit between the existing flag bits and the order field. This is fine for correctness but the comment block should document the full bit layout. 2. **`HMM_PFN_COMPOUND` documentation typo:** ``` + * HMM_PFN_COMPOUND - The entry is represents a > 0 order page ``` Should be "The entry represents a > 0 order page" (remove "is"). 3. **`migrate_hmm_range_setup()` is `EXPORT_SYMBOL` (not `_GPL`)**. Given that this is a core MM function operating on migrate_vma internals, `EXPORT_SYMBOL_GPL` would be more appropriate to match the convention of `migrate_vma_setup` and friends which are `EXPORT_SYMBOL`. 4. **`migrate_vma_unmap()` call from `migrate_hmm_range_setup()`**: This works because both are in `migrate_device.c`, but `migrate_vma_unmap()` is static. If `migrate_hmm_range_setup()` were ever moved, this would break. Worth noting but not blocking. 5. **`range->migrate` uses spaces for alignment** instead of tabs in the struct definition: ``` + struct migrate_vma *migrate; ``` Should use a tab for consistency with the other fields. --- --- Generated by Claude Code Patch Reviewer