Re: [PATCH 1/6] mm: rename VMA flag helpers to be more readable

From: David Hildenbrand (Arm)

Date: Wed Mar 25 2026 - 04:56:32 EST


On 3/5/26 11:50, Lorenzo Stoakes (Oracle) wrote:
> On reflection, it's confusing to have vma_flags_test() and
> vma_desc_test_flags() test whether any comma-separated VMA flag bit is set,
> while also having vma_flags_test_all() and vma_test_all_flags() separately
> test whether all flags are set.
>
> Firstly, rename vma_flags_test() to vma_flags_test_any() to eliminate this
> confusion.
>
> Secondly, since the VMA descriptor flag functions are becoming rather
> cumbersome, prefer vma_desc_test*() to vma_desc_test_flags*(), and also
> rename vma_desc_test_flags() to vma_desc_test_any().
>
> Finally, rename vma_test_all_flags() to vma_test_all() to keep the
> VMA-specific helper consistent with the VMA descriptor naming convention
> and to help avoid confusion vs. vma_flags_test_all().
>
> While we're here, also update whitespace to be consistent in helper
> functions.
>
> Suggested-by: Pedro Falcato <pfalcato@xxxxxxx>
> Signed-off-by: Lorenzo Stoakes (Oracle) <ljs@xxxxxxxxxx>
> ---

Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

--
Cheers,

David