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/pci/endpoint | |
| 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/pci/endpoint')
| -rw-r--r-- | drivers/pci/endpoint/functions/pci-epf-mhi.c | 4 | ||||
| -rw-r--r-- | drivers/pci/endpoint/functions/pci-epf-test.c | 2 | ||||
| -rw-r--r-- | drivers/pci/endpoint/pci-ep-cfs.c | 4 | ||||
| -rw-r--r-- | drivers/pci/endpoint/pci-ep-msi.c | 2 | ||||
| -rw-r--r-- | drivers/pci/endpoint/pci-epc-core.c | 2 | ||||
| -rw-r--r-- | drivers/pci/endpoint/pci-epc-mem.c | 4 | ||||
| -rw-r--r-- | drivers/pci/endpoint/pci-epf-core.c | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c index ccee5c6b6ad7..f9cf18aa5b34 100644 --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c @@ -525,7 +525,7 @@ static int pci_epf_mhi_edma_read_async(struct mhi_ep_cntrl *mhi_cntrl, goto err_unmap; } - transfer = kzalloc_obj(*transfer, GFP_KERNEL); + transfer = kzalloc_obj(*transfer); if (!transfer) { ret = -ENOMEM; goto err_unmap; @@ -604,7 +604,7 @@ static int pci_epf_mhi_edma_write_async(struct mhi_ep_cntrl *mhi_cntrl, goto err_unmap; } - transfer = kzalloc_obj(*transfer, GFP_KERNEL); + transfer = kzalloc_obj(*transfer); if (!transfer) { ret = -ENOMEM; goto err_unmap; diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c index 69f6ac37cdd0..582938b7b4f1 100644 --- a/drivers/pci/endpoint/functions/pci-epf-test.c +++ b/drivers/pci/endpoint/functions/pci-epf-test.c @@ -872,7 +872,7 @@ static void pci_epf_test_bar_subrange_setup(struct pci_epf_test *epf_test, sub_size = bar->size / nsub; - submap = kzalloc_objs(*submap, nsub, GFP_KERNEL); + submap = kzalloc_objs(*submap, nsub); if (!submap) goto err; diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c index 6c14cf85d336..0f3921f28f17 100644 --- a/drivers/pci/endpoint/pci-ep-cfs.c +++ b/drivers/pci/endpoint/pci-ep-cfs.c @@ -274,7 +274,7 @@ struct config_group *pci_ep_cfs_add_epc_group(const char *name) struct config_group *group; struct pci_epc_group *epc_group; - epc_group = kzalloc_obj(*epc_group, GFP_KERNEL); + epc_group = kzalloc_obj(*epc_group); if (!epc_group) { ret = -ENOMEM; goto err; @@ -599,7 +599,7 @@ static struct config_group *pci_epf_make(struct config_group *group, char *epf_name; int index, err; - epf_group = kzalloc_obj(*epf_group, GFP_KERNEL); + epf_group = kzalloc_obj(*epf_group); if (!epf_group) return ERR_PTR(-ENOMEM); diff --git a/drivers/pci/endpoint/pci-ep-msi.c b/drivers/pci/endpoint/pci-ep-msi.c index 4625dc9827bc..51c19942a81e 100644 --- a/drivers/pci/endpoint/pci-ep-msi.c +++ b/drivers/pci/endpoint/pci-ep-msi.c @@ -67,7 +67,7 @@ int pci_epf_alloc_doorbell(struct pci_epf *epf, u16 num_db) dev_set_msi_domain(epc->dev.parent, domain); - msg = kzalloc_objs(struct pci_epf_doorbell_msg, num_db, GFP_KERNEL); + msg = kzalloc_objs(struct pci_epf_doorbell_msg, num_db); if (!msg) return -ENOMEM; diff --git a/drivers/pci/endpoint/pci-epc-core.c b/drivers/pci/endpoint/pci-epc-core.c index d6998e637d3c..e546b3dbb240 100644 --- a/drivers/pci/endpoint/pci-epc-core.c +++ b/drivers/pci/endpoint/pci-epc-core.c @@ -982,7 +982,7 @@ __pci_epc_create(struct device *dev, const struct pci_epc_ops *ops, goto err_ret; } - epc = kzalloc_obj(*epc, GFP_KERNEL); + epc = kzalloc_obj(*epc); if (!epc) { ret = -ENOMEM; goto err_ret; diff --git a/drivers/pci/endpoint/pci-epc-mem.c b/drivers/pci/endpoint/pci-epc-mem.c index a3b5f8d1767c..6102a4af9d79 100644 --- a/drivers/pci/endpoint/pci-epc-mem.c +++ b/drivers/pci/endpoint/pci-epc-mem.c @@ -62,7 +62,7 @@ int pci_epc_multi_mem_init(struct pci_epc *epc, if (!windows || !num_windows) return -EINVAL; - epc->windows = kzalloc_objs(*epc->windows, num_windows, GFP_KERNEL); + epc->windows = kzalloc_objs(*epc->windows, num_windows); if (!epc->windows) return -ENOMEM; @@ -74,7 +74,7 @@ int pci_epc_multi_mem_init(struct pci_epc *epc, pages = windows[i].size >> page_shift; bitmap_size = BITS_TO_LONGS(pages) * sizeof(long); - mem = kzalloc_obj(*mem, GFP_KERNEL); + mem = kzalloc_obj(*mem); if (!mem) { ret = -ENOMEM; i--; diff --git a/drivers/pci/endpoint/pci-epf-core.c b/drivers/pci/endpoint/pci-epf-core.c index c44f4ddfd60b..83fd20c11238 100644 --- a/drivers/pci/endpoint/pci-epf-core.c +++ b/drivers/pci/endpoint/pci-epf-core.c @@ -535,7 +535,7 @@ struct pci_epf *pci_epf_create(const char *name) struct device *dev; int len; - epf = kzalloc_obj(*epf, GFP_KERNEL); + epf = kzalloc_obj(*epf); if (!epf) return ERR_PTR(-ENOMEM); |
