mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 12:52:29 -04:00
tracing: Point constant hist field type to string literal
The HIST_FIELD_FL_CONST path uses the fixed "u64" type string. Point hist_field->type directly to the string literal, matching the HIST_FIELD_FL_HITCOUNT path. The release path already uses kfree_const(), so no duplication is needed. Link: https://patch.msgid.link/20260527023450.2137639-1-pengyu@kylinos.cn Signed-off-by: Yu Peng <pengyu@kylinos.cn> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
This commit is contained in:
@@ -1984,9 +1984,7 @@ static struct hist_field *create_hist_field(struct hist_trigger_data *hist_data,
|
||||
if (flags & HIST_FIELD_FL_CONST) {
|
||||
hist_field->fn_num = HIST_FIELD_FN_CONST;
|
||||
hist_field->size = sizeof(u64);
|
||||
hist_field->type = kstrdup("u64", GFP_KERNEL);
|
||||
if (!hist_field->type)
|
||||
goto free;
|
||||
hist_field->type = "u64";
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user