Re: [PATCH] mm/migrate_device: Cleanup up PMD Checks and warnings
From: Zi Yan
Date: Thu Apr 16 2026 - 16:30:51 EST
On 14 Apr 2026, at 10:13, Sunny Patel wrote:
> Remove the odd VM_WARN_ON_FOLIO(!folio, folio) usage and replace it
> with a simpler VM_WARN_ON_ONCE(!folio) check.
>
> Drop the redundant VM_WARN_ON_ONCE(!pmd_none(*pmdp) &&
> !is_huge_zero_pmd(*pmdp)).
>
> Refactor the PMD checks to use pmd_present(), making the control flow
> clearer and avoiding duplicate condition checks.
>
> Signed-off-by: Sunny Patel <nueralspacetech@xxxxxxxxx>
> ---
> mm/migrate_device.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
Acked-by: Zi Yan <ziy@xxxxxxxxxx>
Best Regards,
Yan, Zi