]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Add comments for debug() and pr_fmt
authorSimon Glass <sjg@chromium.org>
Mon, 20 Jun 2016 01:43:03 +0000 (19:43 -0600)
committerTom 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

index 3feaae641c797d5802319969fa309298e4ff2b90..1bb8a7956bf96a7d6547a553223f5622c6129478 100644 (file)
@@ -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)