mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] printk: add dummy printk_force_console_enter/exit helpers
@ 2024-11-12 14:27 Arnd Bergmann
  2024-11-12 14:29 ` [PATCH] [v2] " Arnd Bergmann
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2024-11-12 14:27 UTC (permalink / raw)
  To: Petr Mladek, John Ogness, Marcos Paulo de Souza, Greg Kroah-Hartman
  Cc: Arnd Bergmann, Steven Rostedt, Sergey Senozhatsky,
	Andy Shevchenko, Tony Lindgren, Sreenath Vijayan, linux-kernel

From: Arnd Bergmann <arnd@arndb.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@arndb.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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-11-13 10:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-12 14:27 [PATCH] printk: add dummy printk_force_console_enter/exit helpers Arnd Bergmann
2024-11-12 14:29 ` [PATCH] [v2] " Arnd Bergmann
2024-11-12 15:21   ` Andy Shevchenko
2024-11-12 19:02   ` Marcos Paulo de Souza
2024-11-13 10:30   ` Petr Mladek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®