[U-Boot] [PATCH 3/5] Add comments for debug() and pr_fmt
Simon Glass
sjg at chromium.org
Mon Jun 20 03:43:03 CEST 2016
Add a note to each of these so it is more obvious how they work.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
include/common.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/common.h b/include/common.h
index f9f4605..a425dd9 100644
--- a/include/common.h
+++ b/include/common.h
@@ -100,6 +100,7 @@ typedef volatile unsigned char vu_char;
#define _DEBUG 0
#endif
+/* Define this at the top of a file to add a prefix to debug messages */
#ifndef pr_fmt
#define pr_fmt(fmt) fmt
#endif
@@ -115,6 +116,7 @@ typedef volatile unsigned char vu_char;
printf(pr_fmt(fmt), ##args); \
} while (0)
+/* Show a message if DEBUG is defined in a file */
#define debug(fmt, args...) \
debug_cond(_DEBUG, fmt, ##args)
--
2.8.0.rc3.226.g39d4020
More information about the U-Boot
mailing list