diff options
author | Christoph Müllner <christoph.muellner@theobroma-systems.com> | 2019-05-04 16:54:30 +0200 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2019-08-11 11:26:41 +0200 |
commit | 733522c1443489b8038c93ea6a2ff89fbe413b3b (patch) | |
tree | a1d6b3601015b506a14c241a3c6a964655e6a472 | |
parent | 3f5fcb7a241c97fed1b917a5ebd5983f608b06ce (diff) |
malloc_simple: Convert to non-log output.
The majority of code in U-Boot does not use the log_* API.
This patch streamlines the debug messages of malloc_simple
as well.
Signed-off-by: Christoph Müllner <christoph.muellner@theobroma-systems.com>
-rw-r--r-- | common/malloc_simple.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/common/malloc_simple.c b/common/malloc_simple.c index eabbb70128..2467e636eb 100644 --- a/common/malloc_simple.c +++ b/common/malloc_simple.c @@ -5,8 +5,6 @@ * Copyright (c) 2014 Google, Inc */ -#define LOG_CATEGORY LOGC_ALLOC - #include <common.h> #include <malloc.h> #include <mapmem.h> @@ -21,10 +19,10 @@ static void *alloc_simple(size_t bytes, int align) addr = ALIGN(gd->malloc_base + gd->malloc_ptr, align); new_ptr = addr + bytes - gd->malloc_base; - log_debug("size=%zx, ptr=%lx, limit=%lx: ", bytes, new_ptr, + debug("size=%lx, ptr=%lx, limit=%lx: ", bytes, new_ptr, gd->malloc_limit); if (new_ptr > gd->malloc_limit) { - log_err("alloc space exhausted\n"); + pr_err("alloc space exhausted\n"); return NULL; } @@ -42,7 +40,7 @@ void *malloc_simple(size_t bytes) if (!ptr) return ptr; - log_debug("%lx\n", (ulong)ptr); + debug("%lx\n", (ulong)ptr); return ptr; } @@ -54,7 +52,7 @@ void *memalign_simple(size_t align, size_t bytes) ptr = alloc_simple(bytes, align); if (!ptr) return ptr; - log_debug("aligned to %lx\n", (ulong)ptr); + debug("aligned to %lx\n", (ulong)ptr); return ptr; } @@ -76,6 +74,6 @@ void *calloc(size_t nmemb, size_t elem_size) void malloc_simple_info(void) { - log_info("malloc_simple: %lx bytes used, %lx remain\n", gd->malloc_ptr, + debug("malloc_simple: %lx bytes used, %lx remain\n", gd->malloc_ptr, CONFIG_VAL(SYS_MALLOC_F_LEN) - gd->malloc_ptr); } |