Merge branch 'master' of git://git.denx.de/u-boot-spi
[platform/kernel/u-boot.git] / include / log.h
index bf2848c..0f2bc19 100644 (file)
@@ -48,6 +48,7 @@ enum log_category_t {
        LOGC_EFI,       /* EFI implementation */
        LOGC_ALLOC,     /* Memory allocation */
        LOGC_SANDBOX,   /* Related to the sandbox board */
+       LOGC_BLOBLIST,  /* Bloblist */
 
        LOGC_COUNT,     /* Number of log categories */
        LOGC_END,       /* Sentinel value for a list of log categories */
@@ -113,7 +114,7 @@ int _log(enum log_category_t cat, enum log_level_t level, const char *file,
 /* Emit a log record if the level is less that the maximum */
 #define log(_cat, _level, _fmt, _args...) ({ \
        int _l = _level; \
-       if (_l <= _LOG_MAX_LEVEL) \
+       if (CONFIG_IS_ENABLED(LOG) && _l <= _LOG_MAX_LEVEL) \
                _log((enum log_category_t)(_cat), _l, __FILE__, __LINE__, \
                      __func__, \
                      pr_fmt(_fmt), ##_args); \