linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracing: make exported ftrace_set_clr_event non-static
@ 2019-07-04 17:21 Denis Efremov
  2019-07-07 15:46 ` Joe Jin
  0 siblings, 1 reply; 2+ messages in thread
From: Denis Efremov @ 2019-07-04 17:21 UTC (permalink / raw)
  To: Divya Indi
  Cc: Denis Efremov, Steven Rostedt, Joe Jin, Ingo Molnar, linux-kernel

The function ftrace_set_clr_event is declared static and marked
EXPORT_SYMBOL_GPL(), which is at best an odd combination. Because the
function was decided to be a part of API, this commit removes the static
attribute and adds the declaration to the header.

Fixes: f45d1225adb04 ("tracing: Kernel access to Ftrace instances")
Signed-off-by: Denis Efremov <efremov@linux.com>
---
 include/linux/trace_events.h | 1 +
 kernel/trace/trace_events.c  | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 8a62731673f7..84bc84f00e8f 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -539,6 +539,7 @@ extern int trace_event_get_offsets(struct trace_event_call *call);
 
 #define is_signed_type(type)	(((type)(-1)) < (type)1)
 
+int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set);
 int trace_set_clr_event(const char *system, const char *event, int set);
 
 /*
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 0ce3db67f556..b6b46184f6bf 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -795,7 +795,7 @@ static int __ftrace_set_clr_event(struct trace_array *tr, const char *match,
 	return ret;
 }
 
-static int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set)
+int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set)
 {
 	char *event = NULL, *sub = NULL, *match;
 	int ret;
-- 
2.21.0


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

* Re: [PATCH] tracing: make exported ftrace_set_clr_event non-static
  2019-07-04 17:21 [PATCH] tracing: make exported ftrace_set_clr_event non-static Denis Efremov
@ 2019-07-07 15:46 ` Joe Jin
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Jin @ 2019-07-07 15:46 UTC (permalink / raw)
  To: Denis Efremov, Divya Indi; +Cc: Steven Rostedt, Ingo Molnar, linux-kernel

Patch looks good to me.

Reviewed-by: Joe Jin <joe.jin@oracle.com>

Thanks,
Joe
On 7/4/19 10:21 AM, Denis Efremov wrote:
> The function ftrace_set_clr_event is declared static and marked
> EXPORT_SYMBOL_GPL(), which is at best an odd combination. Because the
> function was decided to be a part of API, this commit removes the static
> attribute and adds the declaration to the header.
> 
> Fixes: f45d1225adb04 ("tracing: Kernel access to Ftrace instances")
> Signed-off-by: Denis Efremov <efremov@linux.com>
> ---
>  include/linux/trace_events.h | 1 +
>  kernel/trace/trace_events.c  | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
> index 8a62731673f7..84bc84f00e8f 100644
> --- a/include/linux/trace_events.h
> +++ b/include/linux/trace_events.h
> @@ -539,6 +539,7 @@ extern int trace_event_get_offsets(struct trace_event_call *call);
>  
>  #define is_signed_type(type)	(((type)(-1)) < (type)1)
>  
> +int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set);
>  int trace_set_clr_event(const char *system, const char *event, int set);
>  
>  /*
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 0ce3db67f556..b6b46184f6bf 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -795,7 +795,7 @@ static int __ftrace_set_clr_event(struct trace_array *tr, const char *match,
>  	return ret;
>  }
>  
> -static int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set)
> +int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set)
>  {
>  	char *event = NULL, *sub = NULL, *match;
>  	int ret;
> 


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

end of thread, other threads:[~2019-07-07 15:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-04 17:21 [PATCH] tracing: make exported ftrace_set_clr_event non-static Denis Efremov
2019-07-07 15:46 ` Joe Jin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).