[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241112142748.673772-1-arnd@kernel.org>
Date: Tue, 12 Nov 2024 15:27:34 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: Petr Mladek <pmladek@...e.com>,
John Ogness <john.ogness@...utronix.de>,
Marcos Paulo de Souza <mpdesouza@...e.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Arnd Bergmann <arnd@...db.de>,
Steven Rostedt <rostedt@...dmis.org>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Tony Lindgren <tony.lindgren@...ux.intel.com>,
Sreenath Vijayan <sreenath.vijayan@...y.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] printk: add dummy printk_force_console_enter/exit helpers
From: Arnd Bergmann <arnd@...db.de>
The newly added interface is broken when PRINTK is disabled:
drivers/tty/sysrq.c: In function '__handle_sysrq':
drivers/tty/sysrq.c:601:9: error: implicit declaration of function 'printk_force_console_enter' [-Wimplicit-function-declaration]
601 | printk_force_console_enter();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/tty/sysrq.c:611:25: error: implicit declaration of function 'printk_force_console_exit' [-Wimplicit-function-declaration]
611 | printk_force_console_exit();
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Add empty stub functions for both.
Fixes: ed76c07c6885 ("printk: Introduce FORCE_CON flag")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
include/linux/printk.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 232e5fd06701..0f2d7bdcea54 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -232,6 +232,14 @@ static inline void printk_deferred_exit(void)
{
}
+static void printk_force_console_enter(void)
+{
+}
+
+static void printk_force_console_exit(void)
+{
+}
+
static inline int printk_ratelimit(void)
{
return 0;
--
2.39.5
Powered by blists - more mailing lists