diff mbox series

[U-Boot,1/1] sandbox: remove stray DEBUG

Message ID 20181014184532.4024-1-xypron.glpk@gmx.de
State Accepted
Commit 9190a3eb8010cdfbcd56905b784c5a21ca90914a
Delegated to: Simon Glass
Headers show
Series [U-Boot,1/1] sandbox: remove stray DEBUG | expand

Commit Message

Heinrich Schuchardt Oct. 14, 2018, 6:45 p.m. UTC
DEBUG should not be defined in production code.
Change printf() to debug() where this writes a debug message.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 arch/sandbox/cpu/cpu.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Alexander Graf Oct. 16, 2018, 1:22 p.m. UTC | #1
On 14.10.18 20:45, Heinrich Schuchardt wrote:
> DEBUG should not be defined in production code.
> Change printf() to debug() where this writes a debug message.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

Reviewed-by: Alexander Graf <agraf@suse.de>


Alex
Simon Glass Oct. 19, 2018, 3:25 a.m. UTC | #2
On 14 October 2018 at 12:45, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> DEBUG should not be defined in production code.
> Change printf() to debug() where this writes a debug message.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  arch/sandbox/cpu/cpu.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c
index 6098945049..fdfb209f77 100644
--- a/arch/sandbox/cpu/cpu.c
+++ b/arch/sandbox/cpu/cpu.c
@@ -2,7 +2,7 @@ 
 /*
  * Copyright (c) 2011 The Chromium OS Authors.
  */
-#define DEBUG
+
 #include <common.h>
 #include <dm.h>
 #include <errno.h>
@@ -105,8 +105,8 @@  void *phys_to_virt(phys_addr_t paddr)
 	state = state_get_current();
 	list_for_each_entry(mentry, &state->mapmem_head, sibling_node) {
 		if (mentry->tag == paddr) {
-			printf("%s: Used map from %lx to %p\n", __func__,
-			       (ulong)paddr, mentry->ptr);
+			debug("%s: Used map from %lx to %p\n", __func__,
+			      (ulong)paddr, mentry->ptr);
 			return mentry->ptr;
 		}
 	}
@@ -152,7 +152,7 @@  phys_addr_t virt_to_phys(void *ptr)
 		       __func__, ptr, (ulong)gd->ram_size);
 		os_abort();
 	}
-	printf("%s: Used map from %p to %lx\n", __func__, ptr, mentry->tag);
+	debug("%s: Used map from %p to %lx\n", __func__, ptr, mentry->tag);
 
 	return mentry->tag;
 }