summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-06-19 19:43:03 -0600
committerTom Rini <trini@konsulko.com>2016-07-14 18:33:10 -0400
commit5e7f74332465f0addc05634d351df8eeaa2015d2 (patch)
treec6d25af5be47c325dfd1121c274246d26a0491c1 /include
parent6b424611a8dee0444459c0c205a9d72f65f61456 (diff)
Add comments for debug() and pr_fmt
Add a note to each of these so it is more obvious how they work. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 3feaae641c..1bb8a7956b 100644
--- 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)