summaryrefslogtreecommitdiff
path: root/kernel/liveupdate
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/liveupdate
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/liveupdate')
-rw-r--r--kernel/liveupdate/kexec_handover.c4
-rw-r--r--kernel/liveupdate/kexec_handover_debugfs.c2
-rw-r--r--kernel/liveupdate/luo_file.c4
-rw-r--r--kernel/liveupdate/luo_flb.c2
-rw-r--r--kernel/liveupdate/luo_session.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
index 23d76678d233..cc68a3692905 100644
--- a/kernel/liveupdate/kexec_handover.c
+++ b/kernel/liveupdate/kexec_handover.c
@@ -187,7 +187,7 @@ static int __kho_preserve_order(struct kho_mem_track *track, unsigned long pfn,
if (!physxa) {
int err;
- new_physxa = kzalloc_obj(*physxa, GFP_KERNEL);
+ new_physxa = kzalloc_obj(*physxa);
if (!new_physxa)
return -ENOMEM;
@@ -1090,7 +1090,7 @@ void *kho_restore_vmalloc(const struct kho_vmalloc *preservation)
return NULL;
total_pages = preservation->total_pages;
- pages = kvmalloc_objs(*pages, total_pages, GFP_KERNEL);
+ pages = kvmalloc_objs(*pages, total_pages);
if (!pages)
return NULL;
order = preservation->order;
diff --git a/kernel/liveupdate/kexec_handover_debugfs.c b/kernel/liveupdate/kexec_handover_debugfs.c
index d42fc940d14d..2f93939168ab 100644
--- a/kernel/liveupdate/kexec_handover_debugfs.c
+++ b/kernel/liveupdate/kexec_handover_debugfs.c
@@ -29,7 +29,7 @@ static int __kho_debugfs_fdt_add(struct list_head *list, struct dentry *dir,
struct fdt_debugfs *f;
struct dentry *file;
- f = kmalloc_obj(*f, GFP_KERNEL);
+ f = kmalloc_obj(*f);
if (!f)
return -ENOMEM;
diff --git a/kernel/liveupdate/luo_file.c b/kernel/liveupdate/luo_file.c
index ca96edb3b4e5..8c79058253e1 100644
--- a/kernel/liveupdate/luo_file.c
+++ b/kernel/liveupdate/luo_file.c
@@ -289,7 +289,7 @@ int luo_preserve_file(struct luo_file_set *file_set, u64 token, int fd)
if (err)
goto err_free_files_mem;
- luo_file = kzalloc_obj(*luo_file, GFP_KERNEL);
+ luo_file = kzalloc_obj(*luo_file);
if (!luo_file) {
err = -ENOMEM;
goto err_flb_unpreserve;
@@ -780,7 +780,7 @@ int luo_file_deserialize(struct luo_file_set *file_set,
return -ENOENT;
}
- luo_file = kzalloc_obj(*luo_file, GFP_KERNEL);
+ luo_file = kzalloc_obj(*luo_file);
if (!luo_file)
return -ENOMEM;
diff --git a/kernel/liveupdate/luo_flb.c b/kernel/liveupdate/luo_flb.c
index 5f2cdf9caa7b..f52e8114837e 100644
--- a/kernel/liveupdate/luo_flb.c
+++ b/kernel/liveupdate/luo_flb.c
@@ -343,7 +343,7 @@ int liveupdate_register_flb(struct liveupdate_file_handler *fh,
if (WARN_ON(list_empty(&ACCESS_PRIVATE(fh, list))))
return -EINVAL;
- link = kzalloc_obj(*link, GFP_KERNEL);
+ link = kzalloc_obj(*link);
if (!link)
return -ENOMEM;
diff --git a/kernel/liveupdate/luo_session.c b/kernel/liveupdate/luo_session.c
index c0262ca00533..783677295640 100644
--- a/kernel/liveupdate/luo_session.c
+++ b/kernel/liveupdate/luo_session.c
@@ -119,7 +119,7 @@ static struct luo_session_global luo_session_global = {
static struct luo_session *luo_session_alloc(const char *name)
{
- struct luo_session *session = kzalloc_obj(*session, GFP_KERNEL);
+ struct luo_session *session = kzalloc_obj(*session);
if (!session)
return ERR_PTR(-ENOMEM);