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>
This commit is contained in:
Linus Torvalds 2026-02-21 16:37:42 -08:00
parent e19e1b480a
commit bf4afc53b7
6673 changed files with 13013 additions and 13013 deletions

View file

@ -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;

View file

@ -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;