summaryrefslogtreecommitdiff
path: root/kernel/trace/trace_events.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.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.c')
-rw-r--r--kernel/trace/trace_events.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 1d5ce0244f8c..9928da636c9d 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -976,7 +976,7 @@ static int cache_mod(struct trace_array *tr, const char *mod, int set,
if (!set)
return remove_cache_mod(tr, mod, match, system, event);
- event_mod = kzalloc_obj(*event_mod, GFP_KERNEL);
+ event_mod = kzalloc_obj(*event_mod);
if (!event_mod)
return -ENOMEM;
@@ -1648,7 +1648,7 @@ static void *s_start(struct seq_file *m, loff_t *pos)
struct set_event_iter *iter;
loff_t l;
- iter = kzalloc_obj(*iter, GFP_KERNEL);
+ iter = kzalloc_obj(*iter);
mutex_lock(&event_mutex);
if (!iter)
return NULL;
@@ -2206,7 +2206,7 @@ event_filter_read(struct file *filp, char __user *ubuf, size_t cnt,
if (*ppos)
return 0;
- s = kmalloc_obj(*s, GFP_KERNEL);
+ s = kmalloc_obj(*s);
if (!s)
return -ENOMEM;
@@ -2320,7 +2320,7 @@ static int system_tr_open(struct inode *inode, struct file *filp)
int ret;
/* Make a temporary dir that has no system but points to tr */
- dir = kzalloc_obj(*dir, GFP_KERNEL);
+ dir = kzalloc_obj(*dir);
if (!dir)
return -ENOMEM;
@@ -2366,7 +2366,7 @@ subsystem_filter_read(struct file *filp, char __user *ubuf, size_t cnt,
if (*ppos)
return 0;
- s = kmalloc_obj(*s, GFP_KERNEL);
+ s = kmalloc_obj(*s);
if (!s)
return -ENOMEM;
@@ -2416,7 +2416,7 @@ show_header_page_file(struct file *filp, char __user *ubuf, size_t cnt, loff_t *
if (*ppos)
return 0;
- s = kmalloc_obj(*s, GFP_KERNEL);
+ s = kmalloc_obj(*s);
if (!s)
return -ENOMEM;
@@ -2440,7 +2440,7 @@ show_header_event_file(struct file *filp, char __user *ubuf, size_t cnt, loff_t
if (*ppos)
return 0;
- s = kmalloc_obj(*s, GFP_KERNEL);
+ s = kmalloc_obj(*s);
if (!s)
return -ENOMEM;
@@ -2881,7 +2881,7 @@ create_new_subsystem(const char *name)
struct event_subsystem *system;
/* need to create new entry */
- system = kmalloc_obj(*system, GFP_KERNEL);
+ system = kmalloc_obj(*system);
if (!system)
return NULL;
@@ -2892,7 +2892,7 @@ create_new_subsystem(const char *name)
if (!system->name)
goto out_free;
- system->filter = kzalloc_obj(struct event_filter, GFP_KERNEL);
+ system->filter = kzalloc_obj(struct event_filter);
if (!system->filter)
goto out_free;
@@ -2960,7 +2960,7 @@ event_subsystem_dir(struct trace_array *tr, const char *name,
}
}
- dir = kmalloc_obj(*dir, GFP_KERNEL);
+ dir = kmalloc_obj(*dir);
if (!dir)
goto out_fail;
@@ -3403,7 +3403,7 @@ static void add_str_to_module(struct module *module, char *str)
{
struct module_string *modstr;
- modstr = kmalloc_obj(*modstr, GFP_KERNEL);
+ modstr = kmalloc_obj(*modstr);
/*
* If we failed to allocate memory here, then we'll just
@@ -4365,7 +4365,7 @@ event_enable_func(struct trace_array *tr, struct ftrace_hash *hash,
goto out_put;
ret = -ENOMEM;
- data = kzalloc_obj(*data, GFP_KERNEL);
+ data = kzalloc_obj(*data);
if (!data)
goto out_put;