* [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 related [flat|nested] 5+ messages in thread
* [PATCH] [v2] printk: add dummy printk_force_console_enter/exit helpers
2024-11-12 14:27 [PATCH] printk: add dummy printk_force_console_enter/exit helpers Arnd Bergmann
@ 2024-11-12 14:29 ` Arnd Bergmann
2024-11-12 15:21 ` Andy Shevchenko
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Arnd Bergmann @ 2024-11-12 14:29 UTC (permalink / raw)
To: Petr Mladek, John Ogness, Marcos Paulo de Souza,
Greg Kroah-Hartman
Cc: Arnd Bergmann, Steven Rostedt, Sergey Senozhatsky,
Andy Shevchenko, Sebastian Andrzej Siewior, 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>
---
v2: realized I sent the wrong version that was missing 'inline'.
---
include/linux/printk.h | 8 ++++++++
1 file changed, 8 insertions(+)
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;
--
2.39.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] [v2] printk: add dummy printk_force_console_enter/exit helpers
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
2 siblings, 0 replies; 5+ messages in thread
From: Andy Shevchenko @ 2024-11-12 15:21 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Petr Mladek, John Ogness, Marcos Paulo de Souza,
Greg Kroah-Hartman, Arnd Bergmann, Steven Rostedt,
Sergey Senozhatsky, Sebastian Andrzej Siewior, linux-kernel
On Tue, Nov 12, 2024 at 03:29:15PM +0100, Arnd Bergmann wrote:
> 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.
Does it compile with `make W=1` without warnings/errors? If so, I am okay with
the approach.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [v2] printk: add dummy printk_force_console_enter/exit helpers
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
2 siblings, 0 replies; 5+ messages in thread
From: Marcos Paulo de Souza @ 2024-11-12 19:02 UTC (permalink / raw)
To: Arnd Bergmann, Petr Mladek, John Ogness, Greg Kroah-Hartman
Cc: Arnd Bergmann, Steven Rostedt, Sergey Senozhatsky,
Andy Shevchenko, Sebastian Andrzej Siewior, linux-kernel
On Tue, 2024-11-12 at 15:29 +0100, Arnd Bergmann wrote:
> 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.
Ouch, indeed, my fault. After disabling prinkt I saw the build errors.
Thanks for fixing it!
Reviewed-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Tested-by: Marcos Paulo de Souza <mpdesouza@suse.com>
>
> Fixes: ed76c07c6885 ("printk: Introduce FORCE_CON flag")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> v2: realized I sent the wrong version that was missing 'inline'.
> ---
> include/linux/printk.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> 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;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [v2] printk: add dummy printk_force_console_enter/exit helpers
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
2 siblings, 0 replies; 5+ messages in thread
From: Petr Mladek @ 2024-11-13 10:30 UTC (permalink / raw)
To: Arnd Bergmann
Cc: John Ogness, Marcos Paulo de Souza, Greg Kroah-Hartman,
Arnd Bergmann, Steven Rostedt, Sergey Senozhatsky,
Andy Shevchenko, Sebastian Andrzej Siewior, linux-kernel
On Tue 2024-11-12 15:29:15, Arnd Bergmann wrote:
> 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>
Thanks a lot for the fix!
I have just pushed it into printk/linux.git,
branch for-6.13-force-console.
Best Regards,
Petr
^ 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