All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check
@ 2024-02-11 22:43 Max Kellermann
  2024-02-16 13:30 ` Helge Deller
  0 siblings, 1 reply; 2+ messages in thread
From: Max Kellermann @ 2024-02-11 22:43 UTC (permalink / raw)
  To: rostedt, mhiramat, mark.rutland, James.Bottomley, deller,
	linux-trace-kernel, linux-parisc, linux-kernel
  Cc: Max Kellermann

Fixes a bug revealed by -Wmissing-prototypes when
CONFIG_FUNCTION_GRAPH_TRACER is enabled but not CONFIG_DYNAMIC_FTRACE:

 arch/parisc/kernel/ftrace.c:82:5: error: no previous prototype for 'ftrace_enable_ftrace_graph_caller' [-Werror=missing-prototypes]
    82 | int ftrace_enable_ftrace_graph_caller(void)
       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 arch/parisc/kernel/ftrace.c:88:5: error: no previous prototype for 'ftrace_disable_ftrace_graph_caller' [-Werror=missing-prototypes]
    88 | int ftrace_disable_ftrace_graph_caller(void)
       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
---
 arch/parisc/kernel/ftrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c
index d1defb9ede70..621a4b386ae4 100644
--- a/arch/parisc/kernel/ftrace.c
+++ b/arch/parisc/kernel/ftrace.c
@@ -78,7 +78,7 @@ asmlinkage void notrace __hot ftrace_function_trampoline(unsigned long parent,
 #endif
 }
 
-#ifdef CONFIG_FUNCTION_GRAPH_TRACER
+#if defined(CONFIG_DYNAMIC_FTRACE) && defined(CONFIG_FUNCTION_GRAPH_TRACER)
 int ftrace_enable_ftrace_graph_caller(void)
 {
 	static_key_enable(&ftrace_graph_enable.key);
-- 
2.39.2


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

* Re: [PATCH] parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check
  2024-02-11 22:43 [PATCH] parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check Max Kellermann
@ 2024-02-16 13:30 ` Helge Deller
  0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2024-02-16 13:30 UTC (permalink / raw)
  To: Max Kellermann, rostedt, mhiramat, mark.rutland, James.Bottomley,
	linux-trace-kernel, linux-parisc, linux-kernel

On 2/11/24 23:43, Max Kellermann wrote:
> Fixes a bug revealed by -Wmissing-prototypes when
> CONFIG_FUNCTION_GRAPH_TRACER is enabled but not CONFIG_DYNAMIC_FTRACE:
>
>   arch/parisc/kernel/ftrace.c:82:5: error: no previous prototype for 'ftrace_enable_ftrace_graph_caller' [-Werror=missing-prototypes]
>      82 | int ftrace_enable_ftrace_graph_caller(void)
>         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   arch/parisc/kernel/ftrace.c:88:5: error: no previous prototype for 'ftrace_disable_ftrace_graph_caller' [-Werror=missing-prototypes]
>      88 | int ftrace_disable_ftrace_graph_caller(void)
>         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Signed-off-by: Max Kellermann <max.kellermann@ionos.com>


applied to parisc git tree.

Thanks!
Helge


> ---
>   arch/parisc/kernel/ftrace.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c
> index d1defb9ede70..621a4b386ae4 100644
> --- a/arch/parisc/kernel/ftrace.c
> +++ b/arch/parisc/kernel/ftrace.c
> @@ -78,7 +78,7 @@ asmlinkage void notrace __hot ftrace_function_trampoline(unsigned long parent,
>   #endif
>   }
>
> -#ifdef CONFIG_FUNCTION_GRAPH_TRACER
> +#if defined(CONFIG_DYNAMIC_FTRACE) && defined(CONFIG_FUNCTION_GRAPH_TRACER)
>   int ftrace_enable_ftrace_graph_caller(void)
>   {
>   	static_key_enable(&ftrace_graph_enable.key);


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

end of thread, other threads:[~2024-02-16 13:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-11 22:43 [PATCH] parisc/ftrace: add missing CONFIG_DYNAMIC_FTRACE check Max Kellermann
2024-02-16 13:30 ` Helge Deller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.