Re: [PATCH v2 09/13] mm: update all remaining mmap_prepare users to use vma_flags_t
From: Andrew Morton
Date: Fri Feb 06 2026 - 14:35:20 EST
On Fri, 6 Feb 2026 17:46:36 +0000 Pedro Falcato <pfalcato@xxxxxxx> wrote:
> > -#define VM_REMAP_FLAGS (VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP)
> > +#define VMA_REMAP_FLAGS mk_vma_flags(VMA_IO_BIT, VMA_PFNMAP_BIT, \
> > + VMA_DONTEXPAND_BIT, VMA_DONTDUMP_BIT)
>
> as a sidenote, these flags are no longer constant expressions and thus
>
> static vma_flags_t flags = VMA_REMAP_FLAGS;
>
> can't compile.
Yup, that isn't nice. An all-caps thing with no () is a compile-time
constant.
It looks like we can make this a nice inlined (commented!) lower-cased
C function as a little low-priority cleanup.
> Rest LGTM though.
>
> Acked-by: Pedro Falcato <pfalcato@xxxxxxx>
Great, thanks.