summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2026-08-07 10:13:10 -0700
committerAndrew Morton <akpm@linux-foundation.org>2026-08-24 18:43:11 -0700
commit28b13c3c4c6592da8dd59a7b06655e39665ee624 (patch)
treee546bc82fd5a02ad2782b74d96b7a576425cecad /include/linux
parent3774c56cc38b9ddcdf46dd717d4de954b40d8986 (diff)
mm: make VM_FAULT_RESULT_TRACE compatible with sparse
Fix the following sparse warnings that appear while building f2fs: ./include/trace/events/f2fs.h:1469:1: warning: incorrect type in initializer (different base types) ./include/trace/events/f2fs.h:1469:1: expected unsigned long mask ./include/trace/events/f2fs.h:1469:1: got restricted vm_fault_t Link: https://lore.kernel.org/e56c9e2aead04f79192c3110de80d846e41e3791.1786122711.git.bvanassche@acm.org Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: Lorenzo Stoakes (ARM) <ljs@kernel.org> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Reviewed-by: Anshuman Khandual <anshuman.kahndual@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm_types.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index ebf0d912be7d..6d815f6440c9 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -1718,20 +1718,20 @@ enum vm_fault_reason {
VM_FAULT_SIGSEGV | VM_FAULT_HWPOISON | \
VM_FAULT_HWPOISON_LARGE | VM_FAULT_FALLBACK)
-#define VM_FAULT_RESULT_TRACE \
- { VM_FAULT_OOM, "OOM" }, \
- { VM_FAULT_SIGBUS, "SIGBUS" }, \
- { VM_FAULT_MAJOR, "MAJOR" }, \
- { VM_FAULT_HWPOISON, "HWPOISON" }, \
- { VM_FAULT_HWPOISON_LARGE, "HWPOISON_LARGE" }, \
- { VM_FAULT_SIGSEGV, "SIGSEGV" }, \
- { VM_FAULT_NOPAGE, "NOPAGE" }, \
- { VM_FAULT_LOCKED, "LOCKED" }, \
- { VM_FAULT_RETRY, "RETRY" }, \
- { VM_FAULT_FALLBACK, "FALLBACK" }, \
- { VM_FAULT_DONE_COW, "DONE_COW" }, \
- { VM_FAULT_NEEDDSYNC, "NEEDDSYNC" }, \
- { VM_FAULT_COMPLETED, "COMPLETED" }
+#define VM_FAULT_RESULT_TRACE \
+ { (__force u32)VM_FAULT_OOM, "OOM" }, \
+ { (__force u32)VM_FAULT_SIGBUS, "SIGBUS" }, \
+ { (__force u32)VM_FAULT_MAJOR, "MAJOR" }, \
+ { (__force u32)VM_FAULT_HWPOISON, "HWPOISON" }, \
+ { (__force u32)VM_FAULT_HWPOISON_LARGE, "HWPOISON_LARGE" }, \
+ { (__force u32)VM_FAULT_SIGSEGV, "SIGSEGV" }, \
+ { (__force u32)VM_FAULT_NOPAGE, "NOPAGE" }, \
+ { (__force u32)VM_FAULT_LOCKED, "LOCKED" }, \
+ { (__force u32)VM_FAULT_RETRY, "RETRY" }, \
+ { (__force u32)VM_FAULT_FALLBACK, "FALLBACK" }, \
+ { (__force u32)VM_FAULT_DONE_COW, "DONE_COW" }, \
+ { (__force u32)VM_FAULT_NEEDDSYNC, "NEEDDSYNC" }, \
+ { (__force u32)VM_FAULT_COMPLETED, "COMPLETED" }
struct vm_special_mapping {
const char *name; /* The name, e.g. "[vdso]". */