mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
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:
@@ -210,7 +210,7 @@ static struct virtqueue *vp_setup_vq(struct virtio_device *vdev, unsigned int in
|
||||
struct virtio_pci_vq_info **p_info)
|
||||
{
|
||||
struct virtio_pci_device *vp_dev = to_vp_device(vdev);
|
||||
struct virtio_pci_vq_info *info = kmalloc_obj(*info, GFP_KERNEL);
|
||||
struct virtio_pci_vq_info *info = kmalloc_obj(*info);
|
||||
struct virtqueue *vq;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -386,7 +386,7 @@ static int vp_find_vqs_msix(struct virtio_device *vdev, unsigned int nvqs,
|
||||
bool per_vq_vectors;
|
||||
u16 avq_num = 0;
|
||||
|
||||
vp_dev->vqs = kzalloc_objs(*vp_dev->vqs, nvqs, GFP_KERNEL);
|
||||
vp_dev->vqs = kzalloc_objs(*vp_dev->vqs, nvqs);
|
||||
if (!vp_dev->vqs)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -463,7 +463,7 @@ static int vp_find_vqs_intx(struct virtio_device *vdev, unsigned int nvqs,
|
||||
struct virtqueue *vq;
|
||||
u16 avq_num = 0;
|
||||
|
||||
vp_dev->vqs = kzalloc_objs(*vp_dev->vqs, nvqs, GFP_KERNEL);
|
||||
vp_dev->vqs = kzalloc_objs(*vp_dev->vqs, nvqs);
|
||||
if (!vp_dev->vqs)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -685,7 +685,7 @@ static int virtio_pci_probe(struct pci_dev *pci_dev,
|
||||
int rc;
|
||||
|
||||
/* allocate our structure and fill it out */
|
||||
vp_dev = kzalloc_obj(struct virtio_pci_device, GFP_KERNEL);
|
||||
vp_dev = kzalloc_obj(struct virtio_pci_device);
|
||||
if (!vp_dev)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user