linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracing: Fix cpumask() example typo
@ 2022-12-14  3:12 Steven Rostedt
  2022-12-14  7:29 ` Masami Hiramatsu
  2022-12-14 23:44 ` Masami Hiramatsu
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-12-14  3:12 UTC (permalink / raw)
  To: LKML, Linux Trace Kernel; +Cc: Masami Hiramatsu, Andrew Morton

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The sample code for using cpumask used the wrong field for the
__get_cpumask() helper. It used "cpus" which is the bitmask (but would
still give a proper example) instead of the "cpum" that was there to be
used.

Although it produces the same output, fix it, because it's an example and
is confusing in how to properly use the cpumask() macro.

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 samples/trace_events/trace-events-sample.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h
index fb4548a44153..1c6b843b8c4e 100644
--- a/samples/trace_events/trace-events-sample.h
+++ b/samples/trace_events/trace-events-sample.h
@@ -359,7 +359,7 @@ TRACE_EVENT(foo_bar,
 		  __print_array(__get_dynamic_array(list),
 				__get_dynamic_array_len(list) / sizeof(int),
 				sizeof(int)),
-		  __get_str(str), __get_bitmask(cpus), __get_cpumask(cpus),
+		  __get_str(str), __get_bitmask(cpus), __get_cpumask(cpum),
 		  __get_str(vstr))
 );
 
-- 
2.35.1


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

* Re: [PATCH] tracing: Fix cpumask() example typo
  2022-12-14  3:12 [PATCH] tracing: Fix cpumask() example typo Steven Rostedt
@ 2022-12-14  7:29 ` Masami Hiramatsu
  2022-12-14 23:44 ` Masami Hiramatsu
  1 sibling, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2022-12-14  7:29 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Linux Trace Kernel, Masami Hiramatsu, Andrew Morton

On Tue, 13 Dec 2022 22:12:27 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> 
> The sample code for using cpumask used the wrong field for the
> __get_cpumask() helper. It used "cpus" which is the bitmask (but would
> still give a proper example) instead of the "cpum" that was there to be
> used.
> 
> Although it produces the same output, fix it, because it's an example and
> is confusing in how to properly use the cpumask() macro.
> 

Looks good to me.

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

Thanks,

> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
>  samples/trace_events/trace-events-sample.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h
> index fb4548a44153..1c6b843b8c4e 100644
> --- a/samples/trace_events/trace-events-sample.h
> +++ b/samples/trace_events/trace-events-sample.h
> @@ -359,7 +359,7 @@ TRACE_EVENT(foo_bar,
>  		  __print_array(__get_dynamic_array(list),
>  				__get_dynamic_array_len(list) / sizeof(int),
>  				sizeof(int)),
> -		  __get_str(str), __get_bitmask(cpus), __get_cpumask(cpus),
> +		  __get_str(str), __get_bitmask(cpus), __get_cpumask(cpum),
>  		  __get_str(vstr))
>  );
>  
> -- 
> 2.35.1
> 


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

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

* Re: [PATCH] tracing: Fix cpumask() example typo
  2022-12-14  3:12 [PATCH] tracing: Fix cpumask() example typo Steven Rostedt
  2022-12-14  7:29 ` Masami Hiramatsu
@ 2022-12-14 23:44 ` Masami Hiramatsu
  1 sibling, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2022-12-14 23:44 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Linux Trace Kernel, Masami Hiramatsu, Andrew Morton

On Tue, 13 Dec 2022 22:12:27 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
> 
> The sample code for using cpumask used the wrong field for the
> __get_cpumask() helper. It used "cpus" which is the bitmask (but would
> still give a proper example) instead of the "cpum" that was there to be
> used.
> 
> Although it produces the same output, fix it, because it's an example and
> is confusing in how to properly use the cpumask() macro.
> 

Looks good to me.

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

Thanks,

> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
>  samples/trace_events/trace-events-sample.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/samples/trace_events/trace-events-sample.h b/samples/trace_events/trace-events-sample.h
> index fb4548a44153..1c6b843b8c4e 100644
> --- a/samples/trace_events/trace-events-sample.h
> +++ b/samples/trace_events/trace-events-sample.h
> @@ -359,7 +359,7 @@ TRACE_EVENT(foo_bar,
>  		  __print_array(__get_dynamic_array(list),
>  				__get_dynamic_array_len(list) / sizeof(int),
>  				sizeof(int)),
> -		  __get_str(str), __get_bitmask(cpus), __get_cpumask(cpus),
> +		  __get_str(str), __get_bitmask(cpus), __get_cpumask(cpum),
>  		  __get_str(vstr))
>  );
>  
> -- 
> 2.35.1
> 


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

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

end of thread, other threads:[~2022-12-14 23:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-14  3:12 [PATCH] tracing: Fix cpumask() example typo Steven Rostedt
2022-12-14  7:29 ` Masami Hiramatsu
2022-12-14 23:44 ` Masami Hiramatsu

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