linux-trace-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v2] trace: Fix some checker warnings
       [not found] <167023571258.382307.15314866482834835192.stgit@warthog.procyon.org.uk>
@ 2022-12-06 13:18 ` Masami Hiramatsu
  2022-12-06 13:24 ` David Howells
  1 sibling, 0 replies; 5+ messages in thread
From: Masami Hiramatsu @ 2022-12-06 13:18 UTC (permalink / raw)
  To: David Howells; +Cc: rostedt, linux-kernel, Linux Trace Kernel

On Mon, 05 Dec 2022 10:21:52 +0000
David Howells <dhowells@redhat.com> wrote:

> Fix some checker warnings in the trace code by adding __printf attributes
> to a number of trace functions and their declarations.
> 
> Changes:
> ========
> ver #2)
>  - Dropped the fix for the unconditional tracing_max_lat_fops decl[1].
> 

Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

Thank you!

> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Steven Rostedt <rostedt@goodmis.org>
> cc: Masami Hiramatsu <mhiramat@kernel.org>
> Link: https://lore.kernel.org/r/20221205180617.9b9d3971cbe06ee536603523@kernel.org/ [1]
> Link: https://lore.kernel.org/r/166992525941.1716618.13740663757583361463.stgit@warthog.procyon.org.uk/ # v1
> ---
> 
>  include/linux/trace_events.h |    3 ++-
>  include/linux/trace_seq.h    |    3 ++-
>  kernel/trace/trace.h         |    2 +-
>  kernel/trace/trace_output.c  |    5 +++--
>  4 files changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
> index 20749bd9db71..112b08ca2c5c 100644
> --- a/include/linux/trace_events.h
> +++ b/include/linux/trace_events.h
> @@ -235,7 +235,8 @@ void tracing_record_taskinfo_sched_switch(struct task_struct *prev,
>  void tracing_record_cmdline(struct task_struct *task);
>  void tracing_record_tgid(struct task_struct *task);
>  
> -int trace_output_call(struct trace_iterator *iter, char *name, char *fmt, ...);
> +int trace_output_call(struct trace_iterator *iter, char *name, char *fmt, ...)
> +	 __printf(3, 4);
>  
>  struct event_filter;
>  
> diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h
> index 5a2c650d9e1c..0c4c7587d6c3 100644
> --- a/include/linux/trace_seq.h
> +++ b/include/linux/trace_seq.h
> @@ -97,7 +97,8 @@ extern int trace_seq_hex_dump(struct trace_seq *s, const char *prefix_str,
>  			      const void *buf, size_t len, bool ascii);
>  
>  #else /* CONFIG_TRACING */
> -static inline void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
> +static inline __printf(2, 3)
> +void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
>  {
>  }
>  static inline void
> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
> index d42e24507152..ecc6120116da 100644
> --- a/kernel/trace/trace.h
> +++ b/kernel/trace/trace.h
> @@ -615,7 +615,7 @@ void trace_buffer_unlock_commit_nostack(struct trace_buffer *buffer,
>  bool trace_is_tracepoint_string(const char *str);
>  const char *trace_event_format(struct trace_iterator *iter, const char *fmt);
>  void trace_check_vprintf(struct trace_iterator *iter, const char *fmt,
> -			 va_list ap);
> +			 va_list ap) __printf(2, 0);
>  
>  int trace_empty(struct trace_iterator *iter);
>  
> diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
> index 67f47ea27921..7039cd883c8b 100644
> --- a/kernel/trace/trace_output.c
> +++ b/kernel/trace/trace_output.c
> @@ -323,8 +323,9 @@ void trace_event_printf(struct trace_iterator *iter, const char *fmt, ...)
>  }
>  EXPORT_SYMBOL(trace_event_printf);
>  
> -static int trace_output_raw(struct trace_iterator *iter, char *name,
> -			    char *fmt, va_list ap)
> +static __printf(3, 0)
> +int trace_output_raw(struct trace_iterator *iter, char *name,
> +		     char *fmt, va_list ap)
>  {
>  	struct trace_seq *s = &iter->seq;
>  
> 
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

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

* Re: [PATCH v2] trace: Fix some checker warnings
       [not found] <167023571258.382307.15314866482834835192.stgit@warthog.procyon.org.uk>
  2022-12-06 13:18 ` [PATCH v2] trace: Fix some checker warnings Masami Hiramatsu
@ 2022-12-06 13:24 ` David Howells
  2022-12-06 13:58   ` Masami Hiramatsu
  2022-12-06 16:20   ` David Howells
  1 sibling, 2 replies; 5+ messages in thread
From: David Howells @ 2022-12-06 13:24 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: dhowells, rostedt, linux-kernel, Linux Trace Kernel

Is there a tracing tree this can go through?

David


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

* Re: [PATCH v2] trace: Fix some checker warnings
  2022-12-06 13:24 ` David Howells
@ 2022-12-06 13:58   ` Masami Hiramatsu
  2022-12-06 16:20   ` David Howells
  1 sibling, 0 replies; 5+ messages in thread
From: Masami Hiramatsu @ 2022-12-06 13:58 UTC (permalink / raw)
  To: David Howells; +Cc: rostedt, linux-kernel, Linux Trace Kernel

On Tue, 06 Dec 2022 13:24:30 +0000
David Howells <dhowells@redhat.com> wrote:

> Is there a tracing tree this can go through?
> 

Yes, you can find it in MAINTAINERS file.
We are using git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git

Thank you,

> David
> 


-- 
Masami Hiramatsu (Google) <mhiramat@kernel.org>

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

* Re: [PATCH v2] trace: Fix some checker warnings
  2022-12-06 13:24 ` David Howells
  2022-12-06 13:58   ` Masami Hiramatsu
@ 2022-12-06 16:20   ` David Howells
  2022-12-06 16:47     ` Steven Rostedt
  1 sibling, 1 reply; 5+ messages in thread
From: David Howells @ 2022-12-06 16:20 UTC (permalink / raw)
  To: Masami Hiramatsu; +Cc: dhowells, rostedt, linux-kernel, Linux Trace Kernel

Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:

> > Is there a tracing tree this can go through?
> 
> Yes, you can find it in MAINTAINERS file.
> We are using git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git

Okay - is there someone who can apply it to that tree?

David


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

* Re: [PATCH v2] trace: Fix some checker warnings
  2022-12-06 16:20   ` David Howells
@ 2022-12-06 16:47     ` Steven Rostedt
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Rostedt @ 2022-12-06 16:47 UTC (permalink / raw)
  To: David Howells; +Cc: Masami Hiramatsu (Google), linux-kernel, Linux Trace Kernel

On Tue, 06 Dec 2022 16:20:16 +0000
David Howells <dhowells@redhat.com> wrote:

> Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> 
> > > Is there a tracing tree this can go through?  
> > 
> > Yes, you can find it in MAINTAINERS file.
> > We are using git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git  
> 
> Okay - is there someone who can apply it to that tree?
> 

Yes, I'll do it this week, after testing. I'm redoing my testing
infrastructure (to give it to Masami), so I'm a bit behind.

-- Steve


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

end of thread, other threads:[~2022-12-06 16:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <167023571258.382307.15314866482834835192.stgit@warthog.procyon.org.uk>
2022-12-06 13:18 ` [PATCH v2] trace: Fix some checker warnings Masami Hiramatsu
2022-12-06 13:24 ` David Howells
2022-12-06 13:58   ` Masami Hiramatsu
2022-12-06 16:20   ` David Howells
2022-12-06 16:47     ` Steven Rostedt

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).