aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine.mk4
-rw-r--r--include/debug.h10
-rw-r--r--lib/heap/miniheap/miniheap.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/engine.mk b/engine.mk
index 9f80a328..767dee36 100644
--- a/engine.mk
+++ b/engine.mk
@@ -51,8 +51,8 @@ TEST_BUILD ?=
DEBUG ?= 2
# LOG_LEVEL_KERNEL controls LK_LOGLEVEL
-# when LOG_LEVEL_KERNEL = 1, dprintf LK_DEBUGLEVEL_INFO level is enabled
-# when LOG_LEVEL_KERNEL = 2, dprintf LK_DEBUGLEVEL_SPEW level is enabled
+# when LOG_LEVEL_KERNEL = 1, dprintf INFO level is enabled
+# when LOG_LEVEL_KERNEL = 2, dprintf SPEW level is enabled
LOG_LEVEL_KERNEL ?= $(DEBUG)
# LOG_LEVEL_USER controls TLOG_LVL_DEFAULT
diff --git a/include/debug.h b/include/debug.h
index 37747c02..125a258a 100644
--- a/include/debug.h
+++ b/include/debug.h
@@ -33,10 +33,10 @@
#endif
/* debug levels */
-#define LK_DEBUGLEVEL_CRITICAL 0
-#define LK_DEBUGLEVEL_ALWAYS 0
-#define LK_DEBUGLEVEL_INFO 1
-#define LK_DEBUGLEVEL_SPEW 2
+#define CRITICAL 0
+#define ALWAYS 0
+#define INFO 1
+#define SPEW 2
__BEGIN_CDECLS
@@ -65,7 +65,7 @@ static inline void hexdump8(const void *ptr, size_t len)
hexdump8_ex(ptr, len, (uint64_t)((addr_t)ptr));
}
-#define dprintf(level, x...) do { if ((LK_DEBUGLEVEL_##level) <= LK_LOGLEVEL) { printf(x); } } while (0)
+#define dprintf(level, x...) do { if ((level) <= LK_LOGLEVEL) { printf(x); } } while (0)
/* spin the cpu for a period of (short) time */
void spin(uint32_t usecs);
diff --git a/lib/heap/miniheap/miniheap.c b/lib/heap/miniheap/miniheap.c
index 950c0206..ac705cf5 100644
--- a/lib/heap/miniheap/miniheap.c
+++ b/lib/heap/miniheap/miniheap.c
@@ -107,7 +107,7 @@ void miniheap_dump(void)
// nearby ones if possible. Returns base of whatever chunk it became in the list.
static struct free_heap_chunk *heap_insert_free_chunk(struct free_heap_chunk *chunk)
{
-#if LK_DEBUGLEVEL > LK_DEBUGLEVEL_INFO
+#if LK_DEBUGLEVEL > INFO
vaddr_t chunk_end = (vaddr_t)chunk + chunk->len;
#endif