Skip to contentSkip to conversation

include/linux/mmdebug.h: add VM_WARN which maps to WARN()

PATCH New [email protected] 1 participant 1 message Jul 26, 2016 MM core

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 33/126 include/linux/mmdebug.h: add VM_WARN which maps to WARN()

From: "Aneesh Kumar K.V" <[email protected]>
Subject: include/linux/mmdebug.h: add VM_WARN which maps to WARN()

This enables us to do VM_WARN(condition, "warn message");

---

 include/linux/mmdebug.h |    2 ++
 1 file changed, 2 insertions(+)
include/linux/mmdebug.h renamed from include/linux/mmdebug.h~mm-debug-add-vm_warn-which-maps-to-warn +2 -0
diff -puN include/linux/mmdebug.h~mm-debug-add-vm_warn-which-maps-to-warn include/linux/mmdebug.h
@@ -39,6 +39,7 @@ void dump_mm(const struct mm_struct *mm)
 #define VM_WARN_ON(cond) WARN_ON(cond)
 #define VM_WARN_ON_ONCE(cond) WARN_ON_ONCE(cond)
 #define VM_WARN_ONCE(cond, format...) WARN_ONCE(cond, format)
+#define VM_WARN(cond, format...) WARN(cond, format)
 #else
 #define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
 #define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
@@ -47,6 +48,7 @@ void dump_mm(const struct mm_struct *mm)
 #define VM_WARN_ON(cond) BUILD_BUG_ON_INVALID(cond)
 #define VM_WARN_ON_ONCE(cond) BUILD_BUG_ON_INVALID(cond)
 #define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond)
+#define VM_WARN(cond, format...) BUILD_BUG_ON_INVALID(cond)
 #endif
 
 #ifdef CONFIG_DEBUG_VIRTUAL

_