summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_events_hist.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /kernel/trace/trace_events_hist.c
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlinux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
linux-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/trace/trace_events_hist.c')
-rw-r--r--kernel/trace/trace_events_hist.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index da42a087d646..a45cdd05123b 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -732,7 +732,7 @@ static struct track_data *track_data_alloc(unsigned int key_len,
struct action_data *action_data,
struct hist_trigger_data *hist_data)
{
- struct track_data *data = kzalloc_obj(*data, GFP_KERNEL);
+ struct track_data *data = kzalloc_obj(*data);
struct hist_elt_data *elt_data;
if (!data)
@@ -748,7 +748,7 @@ static struct track_data *track_data_alloc(unsigned int key_len,
data->action_data = action_data;
data->hist_data = hist_data;
- elt_data = kzalloc_obj(*elt_data, GFP_KERNEL);
+ elt_data = kzalloc_obj(*elt_data);
if (!elt_data) {
track_data_free(data);
return ERR_PTR(-ENOMEM);
@@ -1086,7 +1086,7 @@ static int save_hist_vars(struct hist_trigger_data *hist_data)
if (tracing_check_open_get_tr(tr))
return -ENODEV;
- var_data = kzalloc_obj(*var_data, GFP_KERNEL);
+ var_data = kzalloc_obj(*var_data);
if (!var_data) {
trace_array_put(tr);
return -ENOMEM;
@@ -1548,7 +1548,7 @@ parse_hist_trigger_attrs(struct trace_array *tr, char *trigger_str)
struct hist_trigger_attrs *attrs;
int ret = 0;
- attrs = kzalloc_obj(*attrs, GFP_KERNEL);
+ attrs = kzalloc_obj(*attrs);
if (!attrs)
return ERR_PTR(-ENOMEM);
@@ -1646,7 +1646,7 @@ static int hist_trigger_elt_data_alloc(struct tracing_map_elt *elt)
struct hist_field *hist_field;
unsigned int i, n_str;
- elt_data = kzalloc_obj(*elt_data, GFP_KERNEL);
+ elt_data = kzalloc_obj(*elt_data);
if (!elt_data)
return -ENOMEM;
@@ -1962,7 +1962,7 @@ static struct hist_field *create_hist_field(struct hist_trigger_data *hist_data,
if (field && is_function_field(field))
return NULL;
- hist_field = kzalloc_obj(struct hist_field, GFP_KERNEL);
+ hist_field = kzalloc_obj(struct hist_field);
if (!hist_field)
return NULL;
@@ -3049,7 +3049,7 @@ create_field_var_hist(struct hist_trigger_data *target_hist_data,
if (!IS_ERR_OR_NULL(event_var))
return event_var;
- var_hist = kzalloc_obj(*var_hist, GFP_KERNEL);
+ var_hist = kzalloc_obj(*var_hist);
if (!var_hist)
return ERR_PTR(-ENOMEM);
@@ -3231,7 +3231,7 @@ static struct hist_field *create_var(struct hist_trigger_data *hist_data,
goto out;
}
- var = kzalloc_obj(struct hist_field, GFP_KERNEL);
+ var = kzalloc_obj(struct hist_field);
if (!var) {
var = ERR_PTR(-ENOMEM);
goto out;
@@ -3292,7 +3292,7 @@ static struct field_var *create_field_var(struct hist_trigger_data *hist_data,
goto err;
}
- field_var = kzalloc_obj(struct field_var, GFP_KERNEL);
+ field_var = kzalloc_obj(struct field_var);
if (!field_var) {
destroy_hist_field(val, 0);
kfree_const(var->type);
@@ -3831,7 +3831,7 @@ static struct action_data *track_data_parse(struct hist_trigger_data *hist_data,
int ret = -EINVAL;
char *var_str;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return ERR_PTR(-ENOMEM);
@@ -4198,7 +4198,7 @@ static struct action_data *onmatch_parse(struct trace_array *tr, char *str)
struct action_data *data;
int ret = -EINVAL;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
return ERR_PTR(-ENOMEM);
@@ -5136,7 +5136,7 @@ create_hist_data(unsigned int map_bits,
struct hist_trigger_data *hist_data;
int ret = 0;
- hist_data = kzalloc_obj(*hist_data, GFP_KERNEL);
+ hist_data = kzalloc_obj(*hist_data);
if (!hist_data)
return ERR_PTR(-ENOMEM);
@@ -5828,7 +5828,7 @@ static int event_hist_open(struct inode *inode, struct file *file)
goto err;
}
- hist_file = kzalloc_obj(*hist_file, GFP_KERNEL);
+ hist_file = kzalloc_obj(*hist_file);
if (!hist_file) {
ret = -ENOMEM;
goto err;
@@ -6602,7 +6602,7 @@ static int hist_register_trigger(char *glob,
data->private_data = named_data->private_data;
set_named_trigger_data(data, named_data);
/* Copy the command ops and update some of the functions */
- cmd_ops = kmalloc_obj(*cmd_ops, GFP_KERNEL);
+ cmd_ops = kmalloc_obj(*cmd_ops);
if (!cmd_ops) {
ret = -ENOMEM;
goto out;