summaryrefslogtreecommitdiff
path: root/virt/kvm
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 /virt/kvm
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 'virt/kvm')
-rw-r--r--virt/kvm/guest_memfd.c2
-rw-r--r--virt/kvm/kvm_main.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c
index e73339295a44..017d84a7adf3 100644
--- a/virt/kvm/guest_memfd.c
+++ b/virt/kvm/guest_memfd.c
@@ -568,7 +568,7 @@ static int __kvm_gmem_create(struct kvm *kvm, loff_t size, u64 flags)
if (fd < 0)
return fd;
- f = kzalloc_obj(*f, GFP_KERNEL);
+ f = kzalloc_obj(*f);
if (!f) {
err = -ENOMEM;
goto err_fd;
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index b798903540b6..22f8a672e1fd 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -4505,7 +4505,7 @@ static long kvm_vcpu_ioctl(struct file *filp,
struct kvm_regs *kvm_regs;
r = -ENOMEM;
- kvm_regs = kzalloc_obj(struct kvm_regs, GFP_KERNEL);
+ kvm_regs = kzalloc_obj(struct kvm_regs);
if (!kvm_regs)
goto out;
r = kvm_arch_vcpu_ioctl_get_regs(vcpu, kvm_regs);
@@ -4532,7 +4532,7 @@ out_free1:
break;
}
case KVM_GET_SREGS: {
- kvm_sregs = kzalloc_obj(struct kvm_sregs, GFP_KERNEL);
+ kvm_sregs = kzalloc_obj(struct kvm_sregs);
r = -ENOMEM;
if (!kvm_sregs)
goto out;
@@ -4624,7 +4624,7 @@ out_free1:
break;
}
case KVM_GET_FPU: {
- fpu = kzalloc_obj(struct kvm_fpu, GFP_KERNEL);
+ fpu = kzalloc_obj(struct kvm_fpu);
r = -ENOMEM;
if (!fpu)
goto out;
@@ -6326,7 +6326,7 @@ static void kvm_uevent_notify_change(unsigned int type, struct kvm *kvm)
active = kvm_active_vms;
mutex_unlock(&kvm_lock);
- env = kzalloc_obj(*env, GFP_KERNEL);
+ env = kzalloc_obj(*env);
if (!env)
return;