summaryrefslogtreecommitdiff
path: root/kernel/gcov
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/gcov
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
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/gcov')
-rw-r--r--kernel/gcov/clang.c4
-rw-r--r--kernel/gcov/fs.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/kernel/gcov/clang.c b/kernel/gcov/clang.c
index 4cfdeb2c9dc2..fd98ced0e51d 100644
--- a/kernel/gcov/clang.c
+++ b/kernel/gcov/clang.c
@@ -81,7 +81,7 @@ static LIST_HEAD(clang_gcov_list);
void llvm_gcov_init(llvm_gcov_callback writeout, llvm_gcov_callback flush)
{
- struct gcov_info *info = kzalloc_obj(*info, GFP_KERNEL);
+ struct gcov_info *info = kzalloc_obj(*info);
if (!info)
return;
@@ -112,7 +112,7 @@ EXPORT_SYMBOL(llvm_gcda_start_file);
void llvm_gcda_emit_function(u32 ident, u32 func_checksum, u32 cfg_checksum)
{
- struct gcov_fn_info *info = kzalloc_obj(*info, GFP_KERNEL);
+ struct gcov_fn_info *info = kzalloc_obj(*info);
if (!info)
return;
diff --git a/kernel/gcov/fs.c b/kernel/gcov/fs.c
index 8430f5cd21b6..2acf677171b1 100644
--- a/kernel/gcov/fs.c
+++ b/kernel/gcov/fs.c
@@ -482,7 +482,7 @@ static void add_links(struct gcov_node *node, struct dentry *parent)
for (num = 0; gcov_link[num].ext; num++)
/* Nothing. */;
- node->links = kzalloc_objs(struct dentry *, num, GFP_KERNEL);
+ node->links = kzalloc_objs(struct dentry *, num);
if (!node->links)
return;
for (i = 0; i < num; i++) {
@@ -731,7 +731,7 @@ static void add_info(struct gcov_node *node, struct gcov_info *info)
* case the new data set is incompatible, the node only contains
* unloaded data sets and there's not enough memory for the array.
*/
- loaded_info = kzalloc_objs(struct gcov_info *, num + 1, GFP_KERNEL);
+ loaded_info = kzalloc_objs(struct gcov_info *, num + 1);
if (!loaded_info) {
pr_warn("could not add '%s' (out of memory)\n",
gcov_info_filename(info));