projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b42461
)
Add comments for debug() and pr_fmt
author
Simon Glass
<sjg@chromium.org>
Mon, 20 Jun 2016 01:43:03 +0000
(19:43 -0600)
committer
Tom Rini
<trini@konsulko.com>
Thu, 14 Jul 2016 22:33:10 +0000
(18:33 -0400)
Add a note to each of these so it is more obvious how they work.
Signed-off-by: Simon Glass <sjg@chromium.org>
include/common.h
patch
|
blob
|
history
diff --git
a/include/common.h
b/include/common.h
index 3feaae641c797d5802319969fa309298e4ff2b90..1bb8a7956bf96a7d6547a553223f5622c6129478 100644
(file)
--- a/
include/common.h
+++ b/
include/common.h
@@
-101,6
+101,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
@@
-116,6
+117,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)