Skip to content

Commit da115c4

Browse files
arndbpmladek
authored andcommitted
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: ed76c07 ("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>
1 parent e3eea25 commit da115c4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/linux/printk.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,14 @@ static inline void printk_deferred_exit(void)
232232
{
233233
}
234234

235+
static inline void printk_force_console_enter(void)
236+
{
237+
}
238+
239+
static inline void printk_force_console_exit(void)
240+
{
241+
}
242+
235243
static inline int printk_ratelimit(void)
236244
{
237245
return 0;

0 commit comments

Comments
 (0)