Skip to content
Snippets Groups Projects
Commit 5e7f7433 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
parent 6b424611
Branches
Tags
No related merge requests found
...@@ -101,6 +101,7 @@ typedef volatile unsigned char vu_char; ...@@ -101,6 +101,7 @@ typedef volatile unsigned char vu_char;
#define _DEBUG 0 #define _DEBUG 0
#endif #endif
/* Define this at the top of a file to add a prefix to debug messages */
#ifndef pr_fmt #ifndef pr_fmt
#define pr_fmt(fmt) fmt #define pr_fmt(fmt) fmt
#endif #endif
...@@ -116,6 +117,7 @@ typedef volatile unsigned char vu_char; ...@@ -116,6 +117,7 @@ typedef volatile unsigned char vu_char;
printf(pr_fmt(fmt), ##args); \ printf(pr_fmt(fmt), ##args); \
} while (0) } while (0)
/* Show a message if DEBUG is defined in a file */
#define debug(fmt, args...) \ #define debug(fmt, args...) \
debug_cond(_DEBUG, fmt, ##args) debug_cond(_DEBUG, fmt, ##args)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment