From 733522c1443489b8038c93ea6a2ff89fbe413b3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20M=C3=BCllner?= Date: Sat, 4 May 2019 16:54:30 +0200 Subject: malloc_simple: Convert to non-log output. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- common/malloc_simple.c | 12 +++++------- 1 file 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 #include #include @@ -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); } -- cgit v1.2.3