diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-07-22 17:27:06 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2021-08-16 18:37:20 +0300 |
commit | 3347d80baa41c357cf263923f60aa8051a753d76 (patch) | |
tree | e4d30c75539ad63456975d6bfafdca0cac753bef /arch/openrisc | |
parent | 370364351926e4fcc7c1a486901bfaae0172b7d9 (diff) | |
download | linux-3347d80baa41c357cf263923f60aa8051a753d76.tar.xz |
tracing: Have histogram types be constant when possible
Instead of kstrdup("const", GFP_KERNEL), have the hist_field type simply
assign the constant hist_field->type = "const"; And when the value passed
to it is a variable, use "kstrdup_const(var, GFP_KERNEL);" which will just
copy the value if the variable is already a constant. This saves on having
to allocate when not needed.
All frees of the hist_field->type will need to use kfree_const().
Link: https://lkml.kernel.org/r/20210722142837.280718447@goodmis.org
Suggested-by: Masami Hiramatsu <mhiramat@kernel.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'arch/openrisc')
0 files changed, 0 insertions, 0 deletions