@@ -114,7 +114,7 @@ void clear_console(void)
* Optionally can skip flushing to drivers, leaving messages
* just in memory console.
*/
-bool __flush_console(bool flush_to_drivers)
+static bool __flush_console(bool flush_to_drivers)
{
struct cpu_thread *cpu = this_cpu();
size_t req, len = 0;
@@ -751,7 +751,7 @@ void fsp_console_poll(void *data __unused)
continue;
}
if (fs->log_port) {
- __flush_console(true);
+ flush_console();
opal_update_pending_evt(fs->irq, 0);
} else {
#ifdef OPAL_DEBUG_CONSOLE_POLL
@@ -59,7 +59,6 @@ extern struct lock con_lock;
extern bool dummy_console_enabled(void);
extern void force_dummy_console(void);
extern bool flush_console(void);
-extern bool __flush_console(bool flush_to_drivers);
extern void set_console(struct con_ops *driver);
extern void console_complete_flush(void);
There is only one use of this function outside of console.c and that usage is broken. As the name suggests this is an internal function that is only safe when the console lock held is held. flush_console() will aquire the lock for the caller so that should be used instead. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> --- core/console.c | 2 +- hw/fsp/fsp-console.c | 2 +- include/console.h | 1 - 3 files changed, 2 insertions(+), 3 deletions(-)