console: Declare empty printk() for __ROMCC__

The typical do { } while (0) did not work, so
provide empty stub function instead.

Change-Id: Ieb0c33b082b4c4453d29d917f46561c0e672d09a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35588
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Kyösti Mälkki
2019-09-24 22:40:43 +03:00
parent 01b60633a8
commit 92bb8320d6
2 changed files with 9 additions and 17 deletions

View File

@ -19,7 +19,6 @@
#include <stdint.h>
#include <arch/cpu.h>
#include <console/post_codes.h>
#include <console/vtxprintf.h>
/* console.h is supposed to provide the log levels defined in here: */
#include <commonlib/loglevel.h>
@ -29,6 +28,8 @@
#ifndef __ROMCC__
#include <console/vtxprintf.h>
void post_code(u8 value);
#if CONFIG(CMOS_POST_EXTRA)
void post_log_extra(u32 value);
@ -93,6 +94,11 @@ int do_printk(int msg_level, const char *fmt, ...)
int do_vprintk(int msg_level, const char *fmt, va_list args);
#else
static inline void romcc_printk(void) { }
#define printk(...) romcc_printk()
#endif /* !__ROMCC__ */
#endif /* CONSOLE_CONSOLE_H_ */