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/cdx | |
| 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/cdx')
| -rw-r--r-- | drivers/cdx/cdx.c | 4 | ||||
| -rw-r--r-- | drivers/cdx/controller/cdx_controller.c | 4 | ||||
| -rw-r--r-- | drivers/cdx/controller/mcdi.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/cdx/cdx.c b/drivers/cdx/cdx.c index 236403a269b6..9196dc50a48d 100644 --- a/drivers/cdx/cdx.c +++ b/drivers/cdx/cdx.c @@ -789,7 +789,7 @@ int cdx_device_add(struct cdx_dev_params *dev_params) struct cdx_device *cdx_dev; int ret, i; - cdx_dev = kzalloc_obj(*cdx_dev, GFP_KERNEL); + cdx_dev = kzalloc_obj(*cdx_dev); if (!cdx_dev) return -ENOMEM; @@ -876,7 +876,7 @@ struct device *cdx_bus_add(struct cdx_controller *cdx, u8 bus_num) struct cdx_device *cdx_dev; int ret; - cdx_dev = kzalloc_obj(*cdx_dev, GFP_KERNEL); + cdx_dev = kzalloc_obj(*cdx_dev); if (!cdx_dev) return NULL; diff --git a/drivers/cdx/controller/cdx_controller.c b/drivers/cdx/controller/cdx_controller.c index abd8f9cdb0b5..280bb7490c0f 100644 --- a/drivers/cdx/controller/cdx_controller.c +++ b/drivers/cdx/controller/cdx_controller.c @@ -168,7 +168,7 @@ static int xlnx_cdx_probe(struct platform_device *pdev) struct cdx_mcdi *cdx_mcdi; int ret; - cdx_mcdi = kzalloc_obj(*cdx_mcdi, GFP_KERNEL); + cdx_mcdi = kzalloc_obj(*cdx_mcdi); if (!cdx_mcdi) return -ENOMEM; @@ -181,7 +181,7 @@ static int xlnx_cdx_probe(struct platform_device *pdev) goto mcdi_init_fail; } - cdx = kzalloc_obj(*cdx, GFP_KERNEL); + cdx = kzalloc_obj(*cdx); if (!cdx) { ret = -ENOMEM; goto cdx_alloc_fail; diff --git a/drivers/cdx/controller/mcdi.c b/drivers/cdx/controller/mcdi.c index 4b3d8f1ef964..34a07d6f41a0 100644 --- a/drivers/cdx/controller/mcdi.c +++ b/drivers/cdx/controller/mcdi.c @@ -118,7 +118,7 @@ int cdx_mcdi_init(struct cdx_mcdi *cdx) struct cdx_mcdi_iface *mcdi; int rc = -ENOMEM; - cdx->mcdi = kzalloc_obj(*cdx->mcdi, GFP_KERNEL); + cdx->mcdi = kzalloc_obj(*cdx->mcdi); if (!cdx->mcdi) goto fail; @@ -456,11 +456,11 @@ static int cdx_mcdi_rpc_sync(struct cdx_mcdi *cdx, unsigned int cmd, if (outlen_actual) *outlen_actual = 0; - wait_data = kmalloc_obj(*wait_data, GFP_KERNEL); + wait_data = kmalloc_obj(*wait_data); if (!wait_data) return -ENOMEM; - cmd_item = kmalloc_obj(*cmd_item, GFP_KERNEL); + cmd_item = kmalloc_obj(*cmd_item); if (!cmd_item) { kfree(wait_data); return -ENOMEM; |
