Index: generic/include/debug.h
===================================================================
--- generic/include/debug.h	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
+++ generic/include/debug.h	(revision 2ccd27513379512abd7c8b126c84a0323a3cb5b6)
@@ -35,5 +35,5 @@
 /** Debugging ASSERT macro
  *
- * If NDEBUG is not set, the ASSERT() macro
+ * If CONFIG_DEBUG is set, the ASSERT() macro
  * evaluates expr and if it is false raises
  * kernel panic.
@@ -42,5 +42,5 @@
  *
  */
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG
 #	define ASSERT(expr) if (!(expr)) { panic("assertion failed (%s)", #expr); }
 #else
Index: generic/include/panic.h
===================================================================
--- generic/include/panic.h	(revision 5f85c910c3b85368172260d2de0f5da623a4742b)
+++ generic/include/panic.h	(revision 2ccd27513379512abd7c8b126c84a0323a3cb5b6)
@@ -30,5 +30,5 @@
 #define __PANIC_H__
 
-#ifndef NDEBUG
+#ifdef CONFIG_DEBUG
 #	define panic(format, ...) panic_printf("Kernel panic in %s() at %s on line %d: " format, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__);
 #else
