Re: [PATCH v2] mm/sparse: simplify the vmemmap alignment check
From: Kiryl Shutsemau
Date: Thu Oct 29 2026 - 10:45:11 EST
On Thu, Oct 29, 2026 at 09:45:21PM +0800, Kaitao Cheng wrote:
> From: Kaitao Cheng <chengkaitao@xxxxxxxxxx>
>
> sparse_init() is called only once during boot, and the vmemmap alignment
> check is outside any loop, so VM_WARN_ON_ONCE() provides no benefit over
> VM_WARN_ON() here.
Okay, that's true. But who cares. __init section will be freed anyway.
I don't see downside in current code.
> Use VM_WARN_ON() and fold compound_info_has_mask() into its condition,
> preserving short-circuit evaluation.
Why? It only got harder to read, no?
--
Kiryl Shutsemau / Kirill A. Shutemov