[coreboot-gerrit] New patch to review for coreboot: 74970c8 console: rename do_vtxprintf to do_printk_va_list and use it

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Tue May 5 08:30:26 CEST 2015


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10096

-gerrit

commit 74970c8197face6b76d07229b4fc4134b56634b6
Author: Aaron Durbin <adurbin at chromium.org>
Date:   Fri May 1 16:48:54 2015 -0500

    console: rename do_vtxprintf to do_printk_va_list and use it
    
    The name is more consistent with what we have elsewhere,
    and the callsite didn't build at all (with vboot enabled)
    
    Change-Id: I3576f3b8f737d360f68b67b6ce1683199948776d
    Signed-off-by: Aaron Durbin <adurbin at chromium.org>
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
---
 src/console/printk.c                             | 4 +++-
 src/include/console/console.h                    | 4 ++--
 src/vendorcode/google/chromeos/vboot2/verstage.c | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/console/printk.c b/src/console/printk.c
index 10a7da2..aab7ff5 100644
--- a/src/console/printk.c
+++ b/src/console/printk.c
@@ -54,8 +54,10 @@ int do_printk(int msg_level, const char *fmt, ...)
 }
 
 #if IS_ENABLED (CONFIG_CHROMEOS)
-void do_vtxprintf(const char *fmt, va_list args)
+void do_printk_va_list(int msg_level, const char *fmt, va_list args)
 {
+	if (!console_log_level(msg_level))
+		return;
 	vtxprintf(wrap_putchar, fmt, args, NULL);
 	console_tx_flush();
 }
diff --git a/src/include/console/console.h b/src/include/console/console.h
index b0971e5..ad93a9a 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -80,9 +80,9 @@ static inline void do_putchar(unsigned char byte) {}
 /* FIXME: Collision of varargs with AMD headers without guard. */
 #include <console/vtxprintf.h>
 #if __CONSOLE_ENABLE__
-void do_vtxprintf(const char *fmt, va_list args);
+void do_printk_va_list(int msg_level, const char *fmt, va_list args);
 #else
-static inline void do_vtxprintf(const char *fmt, va_list args) {};
+static inline void do_printk_va_list(int l, const char *fmt, va_list args) {}
 #endif
 #endif
 
diff --git a/src/vendorcode/google/chromeos/vboot2/verstage.c b/src/vendorcode/google/chromeos/vboot2/verstage.c
index c62c102..019208d 100644
--- a/src/vendorcode/google/chromeos/vboot2/verstage.c
+++ b/src/vendorcode/google/chromeos/vboot2/verstage.c
@@ -45,7 +45,7 @@ void vb2ex_printf(const char *func, const char *fmt, ...)
 
 	printk(BIOS_INFO, "VB2:%s() ", func);
 	va_start(args, fmt);
-	vprintk(BIOS_INFO, fmt, args);
+	do_printk_va_list(BIOS_INFO, fmt, args);
 	va_end(args);
 
 	return;



More information about the coreboot-gerrit mailing list