Skip to contentSkip to conversation

log: Fix the compilation error for emergency log

PATCH In review Akashdeep Kaur 3 participants 3 messages Jun 25, 2025 – Jun 26, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 log: Fix the compilation error for emergency log

The log level "emergency" cannot be used as that results in compilation failure. Correct the macro name used to print at this level.

Fixes 249679658750 ("log: provide missing macros")
---
 include/log.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/log.h +1 -1
index dd44badc361..59c66eb7909 100644
@@ -176,7 +176,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,
 #define _LOG_MAX_LEVEL LOGL_INFO
 #endif
 
-#define log_emer(_fmt...)	log(LOG_CATEGORY, LOGL_EMERG, ##_fmt)
+#define log_emerg(_fmt...)	log(LOG_CATEGORY, LOGL_EMERG, ##_fmt)
 #define log_alert(_fmt...)	log(LOG_CATEGORY, LOGL_ALERT, ##_fmt)
 #define log_crit(_fmt...)	log(LOG_CATEGORY, LOGL_CRIT, ##_fmt)
 #define log_err(_fmt...)	log(LOG_CATEGORY, LOGL_ERR, ##_fmt)
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Akashdeep,

Quoted 8 lines · Akashdeep Kaur

[You don't often get email from [email protected]. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

The log level "emergency" cannot be used as that results in compilation failure. Correct the macro name used to print at this level.

Fixes 249679658750 ("log: provide missing macros")

Thanks!
Quentin

#2 lore raw
In reply to Akashdeep Kaur
Quoted 6 lines · Akashdeep Kaur

The log level "emergency" cannot be used as that results in compilation failure. Correct the macro name used to print at this level.

Fixes 249679658750 ("log: provide missing macros")

Applied to u-boot/master, thanks!

[1/1] log: Fix the compilation error for emergency log

      commit: 757227777b6ff446491fe95977e699b98dbb0434
Signature · 1 line
Tom