summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2024-11-12 17:29:15 +0300
committerPetr Mladek <pmladek@suse.com>2024-11-13 13:00:23 +0300
commitda115c4ee29f589bb72ec2e86eb5e196b6bbcb41 (patch)
tree1899e2434d143bb755339c3fa686ebf1c2c68a25
parente3eea25e0b28ea06eb841ef1814ce7b7254f2fce (diff)
downloadlinux-da115c4ee29f589bb72ec2e86eb5e196b6bbcb41.tar.xz
printk: add dummy printk_force_console_enter/exit helpers
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> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com> Tested-by: Marcos Paulo de Souza <mpdesouza@suse.com> Link: https://lore.kernel.org/r/20241112142939.724093-1-arnd@kernel.org Signed-off-by: Petr Mladek <pmladek@suse.com>
-rw-r--r--include/linux/printk.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/printk.h b/include/linux/printk.h
index 232e5fd06701..4217a9f412b2 100644
--- a/include/linux/printk.h
+++ b/include/linux/printk.h
@@ -232,6 +232,14 @@ static inline void printk_deferred_exit(void)
{
}
+static inline void printk_force_console_enter(void)
+{
+}
+
+static inline void printk_force_console_exit(void)
+{
+}
+
static inline int printk_ratelimit(void)
{
return 0;