mirror of
https://github.com/u-boot/u-boot.git
synced 2024-11-24 04:34:22 +08:00
log: Fix up debug_cond() when LOG is enabled
At present debug() statements can cause debuf output to appear when LOG is enabled but DEBUG is not. This is not intended and it seems that the condition is wrong. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
da39341223
commit
4ce5b8104a
@ -222,11 +222,14 @@ static inline int _log_nop(enum log_category_t cat, enum log_level_t level,
|
||||
#define _SPL_BUILD 0
|
||||
#endif
|
||||
|
||||
#if !_DEBUG && CONFIG_IS_ENABLED(LOG)
|
||||
#if CONFIG_IS_ENABLED(LOG)
|
||||
|
||||
#define debug_cond(cond, fmt, args...) \
|
||||
({ \
|
||||
log(LOG_CATEGORY, LOGL_DEBUG, fmt, ##args); \
|
||||
#define debug_cond(cond, fmt, args...) \
|
||||
({ \
|
||||
if (cond) \
|
||||
log(LOG_CATEGORY, \
|
||||
(enum log_level_t)(LOGL_FORCE_DEBUG | _LOG_DEBUG), \
|
||||
fmt, ##args); \
|
||||
})
|
||||
|
||||
#else /* _DEBUG */
|
||||
|
Loading…
Reference in New Issue
Block a user