From 3202c8afe48d170f68458f0e10b42d04629477c2 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 28 Jan 2021 18:35:12 +0100 Subject: [PATCH] console/console.h: Move get_console_loglevel() declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If for a stage __CONSOLE_ENABLE__ is 0, then there would be no prototype for a get_console_loglevel() definition. Change-Id: I805078921a5cc1506685f8aada3af5c5241260b7 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/50083 Reviewed-by: Kyösti Mälkki Tested-by: build bot (Jenkins) --- src/include/console/console.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/include/console/console.h b/src/include/console/console.h index a96eb15148..d06b5b36fa 100644 --- a/src/include/console/console.h +++ b/src/include/console/console.h @@ -28,6 +28,19 @@ void __noreturn die(const char *fmt, ...); */ void die_notify(void); +#if CONFIG(CONSOLE_OVERRIDE_LOGLEVEL) +/* + * This function should be implemented at mainboard level. + * The returned value will _replace_ the loglevel value; + */ +int get_console_loglevel(void); +#else +static inline int get_console_loglevel(void) +{ + return CONFIG_DEFAULT_CONSOLE_LOGLEVEL; +} +#endif + #define __CONSOLE_ENABLE__ \ ((ENV_BOOTBLOCK && CONFIG(BOOTBLOCK_CONSOLE)) || \ (ENV_POSTCAR && CONFIG(POSTCAR_CONSOLE)) || \ @@ -48,19 +61,6 @@ void console_time_report(void); #define vprintk(LEVEL, fmt, args) do_vprintk(LEVEL, fmt, args) enum { CONSOLE_LOG_NONE = 0, CONSOLE_LOG_FAST, CONSOLE_LOG_ALL }; - -#if CONFIG(CONSOLE_OVERRIDE_LOGLEVEL) -/* - * This function should be implemented at mainboard level. - * The returned value will _replace_ the loglevel value; - */ -int get_console_loglevel(void); -#else -static inline int get_console_loglevel(void) -{ - return CONFIG_DEFAULT_CONSOLE_LOGLEVEL; -} -#endif #else static inline void console_init(void) {} static inline int console_log_level(int msg_level) { return 0; }