diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-08-28 11:44:44 +0100 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-08-30 16:22:52 +0100 |
commit | 5a22e461b5841795c592a08b14c949c46c74e261 (patch) | |
tree | 13d08f9f1a47f8fd736f4780db190bcf3fa00734 /include | |
parent | d5ccb754af8664af33a1f5924ccbd75aa905587a (diff) | |
download | arm-trusted-firmware-5a22e461b5841795c592a08b14c949c46c74e261.tar.gz |
Fix MISRA defects in log helpers
No functional changes.
Change-Id: I850f08718abb69d5d58856b0e3de036266d8c2f4
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/common/debug.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/include/common/debug.h b/include/common/debug.h index ab3e15a73..8ee55b882 100644 --- a/include/common/debug.h +++ b/include/common/debug.h @@ -7,6 +7,8 @@ #ifndef DEBUG_H #define DEBUG_H +#include <utils_def.h> + /* * The log output macros print output to the console. These macros produce * compiled log output only if the LOG_LEVEL defined in the makefile (or the @@ -18,12 +20,12 @@ * WARN("Warning %s.\n", "message") -> WARNING: Warning message. */ -#define LOG_LEVEL_NONE 0 -#define LOG_LEVEL_ERROR 10 -#define LOG_LEVEL_NOTICE 20 -#define LOG_LEVEL_WARNING 30 -#define LOG_LEVEL_INFO 40 -#define LOG_LEVEL_VERBOSE 50 +#define LOG_LEVEL_NONE U(0) +#define LOG_LEVEL_ERROR U(10) +#define LOG_LEVEL_NOTICE U(20) +#define LOG_LEVEL_WARNING U(30) +#define LOG_LEVEL_INFO U(40) +#define LOG_LEVEL_VERBOSE U(50) #ifndef __ASSEMBLY__ #include <cdefs.h> @@ -50,10 +52,10 @@ */ #define no_tf_log(fmt, ...) \ do { \ - if (0) { \ + if (false) { \ tf_log(fmt, ##__VA_ARGS__); \ } \ - } while (0) + } while (false) #if LOG_LEVEL >= LOG_LEVEL_NOTICE # define NOTICE(...) tf_log(LOG_MARKER_NOTICE __VA_ARGS__) |