Re: [PATCH v3 2/2] mm: redefine VM_* flag constants with BIT()
From: David Hildenbrand
Date: Thu Oct 02 2025 - 03:29:56 EST
On 01.10.25 18:51, SeongJae Park wrote:
On Wed, 1 Oct 2025 09:03:53 +0000 Jakub Acs <acsjakub@xxxxxxxxx> wrote:
Make VM_* flag constant definitions consistent - unify all to use BIT()
macro.
This is a separete follow-up fix after we changed VM_MERGEABLE
separately to isolate bugfix for easier backporting. As suggested by
David in [1].
[1]: https://lore.kernel.org/all/85f852f9-8577-4230-adc7-c52e7f479454@xxxxxxxxxx/
Signed-off-by: Jakub Acs <acsjakub@xxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>
Cc: Xu Xin <xu.xin16@xxxxxxxxxx>
Cc: Chengming Zhou <chengming.zhou@xxxxxxxxx>
Cc: Peter Xu <peterx@xxxxxxxxxx>
Cc: Axel Rasmussen <axelrasmussen@xxxxxxxxxx>
Cc: linux-mm@xxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
---
include/linux/mm.h | 66 +++++++++++++++++++++++-----------------------
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c6794d0e24eb..88cab3d7eea2 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -246,56 +246,56 @@ extern unsigned int kobjsize(const void *objp);
* vm_flags in vm_area_struct, see mm_types.h.
* When changing, update also include/trace/events/mmflags.h
*/
-#define VM_NONE 0x00000000
+#define VM_NONE 0
I'm wondering if it could be more consistent to use 0UL instead.
Not really required, and if we're switching to BIT already there is not
a lot of consistency to be had. Would be different if we were avoid
BIT() is in patch v2.
--
Cheers
David / dhildenb