diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 16:37:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-02-21 17:09:51 -0800 |
| commit | bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch) | |
| tree | 01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/vfio/pci/pds | |
| parent | e19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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 'drivers/vfio/pci/pds')
| -rw-r--r-- | drivers/vfio/pci/pds/dirty.c | 4 | ||||
| -rw-r--r-- | drivers/vfio/pci/pds/lm.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/vfio/pci/pds/dirty.c b/drivers/vfio/pci/pds/dirty.c index 7a218948c475..32573f6e8cc6 100644 --- a/drivers/vfio/pci/pds/dirty.c +++ b/drivers/vfio/pci/pds/dirty.c @@ -285,7 +285,7 @@ static int pds_vfio_dirty_enable(struct pds_vfio_pci_device *pds_vfio, num_ranges = max_regions; } - region_info = kzalloc_objs(*region_info, num_ranges, GFP_KERNEL); + region_info = kzalloc_objs(*region_info, num_ranges); if (!region_info) return -ENOMEM; len = num_ranges * sizeof(*region_info); @@ -397,7 +397,7 @@ static int pds_vfio_dirty_seq_ack(struct pds_vfio_pci_device *pds_vfio, * will be enough pages to represent the bmp_bytes */ npages = DIV_ROUND_UP_ULL(bmp_bytes + page_offset, PAGE_SIZE); - pages = kmalloc_objs(*pages, npages, GFP_KERNEL); + pages = kmalloc_objs(*pages, npages); if (!pages) return -ENOMEM; diff --git a/drivers/vfio/pci/pds/lm.c b/drivers/vfio/pci/pds/lm.c index c9a21a049372..08487eab11b0 100644 --- a/drivers/vfio/pci/pds/lm.c +++ b/drivers/vfio/pci/pds/lm.c @@ -24,7 +24,7 @@ pds_vfio_get_lm_file(const struct file_operations *fops, int flags, u64 size) return NULL; /* Alloc file structure */ - lm_file = kzalloc_obj(*lm_file, GFP_KERNEL); + lm_file = kzalloc_obj(*lm_file); if (!lm_file) return NULL; @@ -42,7 +42,7 @@ pds_vfio_get_lm_file(const struct file_operations *fops, int flags, u64 size) /* Allocate memory for file pages */ npages = DIV_ROUND_UP_ULL(size, PAGE_SIZE); - pages = kmalloc_objs(*pages, npages, GFP_KERNEL); + pages = kmalloc_objs(*pages, npages); if (!pages) goto out_put_file; |
