Hello Martin Roth, Marc Jones, Johnny Lin, Angel Pons,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/45771
to review the following change.
Change subject: [RFC] console/init: Drop get_console_loglevel() API ......................................................................
[RFC] console/init: Drop get_console_loglevel() API
It's not used anymore. We keep the CONSOLE_OVERRIDE_LOGLEVEL Kconfig, though, as it provides some user Kconfig comfort (we can hide unneces- sary prompts).
Change-Id: Id6dd54534267c5419cbe81ee4b66f7b753a6e6cf Signed-off-by: Nico Huber nico.h@gmx.de --- M src/console/Kconfig M src/console/init.c M src/include/console/console.h 3 files changed, 4 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/45771/1
diff --git a/src/console/Kconfig b/src/console/Kconfig index bad6c56..57b932d 100644 --- a/src/console/Kconfig +++ b/src/console/Kconfig @@ -312,8 +312,9 @@ config CONSOLE_OVERRIDE_LOGLEVEL bool help - Set to "y" when the platform overrides the loglevel by providing - a get_console_loglevel routine. + Set to "y" when the platform unconditionally overrides the + loglevel default. Then we don't need to present the choice + below.
if !CONSOLE_OVERRIDE_LOGLEVEL
diff --git a/src/console/init.c b/src/console/init.c index 9776e2a..2be2e5a 100644 --- a/src/console/init.c +++ b/src/console/init.c @@ -21,7 +21,7 @@
static void init_log_level(void) { - int debug_level = get_console_loglevel(); + int debug_level = CONFIG_DEFAULT_CONSOLE_LOGLEVEL;
get_option(&debug_level, "debug_level");
diff --git a/src/include/console/console.h b/src/include/console/console.h index a96eb15..bb19cb7 100644 --- a/src/include/console/console.h +++ b/src/include/console/console.h @@ -49,18 +49,6 @@
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; }
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45771 )
Change subject: [RFC] console/init: Drop get_console_loglevel() API ......................................................................
Patch Set 1: Code-Review+1
Hello build bot (Jenkins), Martin Roth, Marc Jones, Johnny Lin, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/45771
to look at the new patch set (#3).
Change subject: [RFC] console/init: Drop get_console_loglevel() API ......................................................................
[RFC] console/init: Drop get_console_loglevel() API
It's not needed anymore. We keep the CONSOLE_OVERRIDE_LOGLEVEL Kconfig, though, as it provides some user Kconfig comfort (we can hide unneces- sary prompts).
Change-Id: Id6dd54534267c5419cbe81ee4b66f7b753a6e6cf Signed-off-by: Nico Huber nico.h@gmx.de --- M src/console/Kconfig M src/console/init.c M src/include/console/console.h M src/mainboard/scaleway/tagada/bmcinfo.c 4 files changed, 4 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/71/45771/3
Nico Huber has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/45771 )
Change subject: [RFC] console/init: Drop get_console_loglevel() API ......................................................................
Abandoned
We decided against calling get_option() for the first console init. But the only mainboard overriding the log level explicitly wants to do so from the bootblock on.