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/remoteproc | |
| 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/remoteproc')
| -rw-r--r-- | drivers/remoteproc/qcom_common.c | 4 | ||||
| -rw-r--r-- | drivers/remoteproc/qcom_sysmon.c | 2 | ||||
| -rw-r--r-- | drivers/remoteproc/qcom_wcnss_iris.c | 2 | ||||
| -rw-r--r-- | drivers/remoteproc/remoteproc_core.c | 10 | ||||
| -rw-r--r-- | drivers/remoteproc/remoteproc_coredump.c | 4 | ||||
| -rw-r--r-- | drivers/remoteproc/remoteproc_virtio.c | 2 | ||||
| -rw-r--r-- | drivers/remoteproc/stm32_rproc.c | 2 | ||||
| -rw-r--r-- | drivers/remoteproc/xlnx_r5_remoteproc.c | 8 |
8 files changed, 17 insertions, 17 deletions
diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c index bb6038bf8bd4..6c31140268ac 100644 --- a/drivers/remoteproc/qcom_common.c +++ b/drivers/remoteproc/qcom_common.c @@ -370,7 +370,7 @@ static struct qcom_ssr_subsystem *qcom_ssr_get_subsys(const char *name) if (!strcmp(info->name, name)) goto out; - info = kzalloc_obj(*info, GFP_KERNEL); + info = kzalloc_obj(*info); if (!info) { info = ERR_PTR(-ENOMEM); goto out; @@ -534,7 +534,7 @@ static int pdm_notify_prepare(struct rproc_subdev *subdev) struct auxiliary_device *adev; int ret; - adev = kzalloc_obj(*adev, GFP_KERNEL); + adev = kzalloc_obj(*adev); if (!adev) return -ENOMEM; diff --git a/drivers/remoteproc/qcom_sysmon.c b/drivers/remoteproc/qcom_sysmon.c index bbbe732fe767..cf10e8ecfb8f 100644 --- a/drivers/remoteproc/qcom_sysmon.c +++ b/drivers/remoteproc/qcom_sysmon.c @@ -628,7 +628,7 @@ struct qcom_sysmon *qcom_add_sysmon_subdev(struct rproc *rproc, struct qcom_sysmon *sysmon; int ret; - sysmon = kzalloc_obj(*sysmon, GFP_KERNEL); + sysmon = kzalloc_obj(*sysmon); if (!sysmon) return ERR_PTR(-ENOMEM); diff --git a/drivers/remoteproc/qcom_wcnss_iris.c b/drivers/remoteproc/qcom_wcnss_iris.c index 78cb8150f64b..2b89b4db6c94 100644 --- a/drivers/remoteproc/qcom_wcnss_iris.c +++ b/drivers/remoteproc/qcom_wcnss_iris.c @@ -125,7 +125,7 @@ struct qcom_iris *qcom_iris_probe(struct device *parent, bool *use_48mhz_xo) return ERR_PTR(-EINVAL); } - iris = kzalloc_obj(*iris, GFP_KERNEL); + iris = kzalloc_obj(*iris); if (!iris) { of_node_put(of_node); return ERR_PTR(-ENOMEM); diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index bb5887a9d2ac..b087ed21858a 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -557,7 +557,7 @@ static int rproc_handle_trace(struct rproc *rproc, void *ptr, return -EINVAL; } - trace = kzalloc_obj(*trace, GFP_KERNEL); + trace = kzalloc_obj(*trace); if (!trace) return -ENOMEM; @@ -635,7 +635,7 @@ static int rproc_handle_devmem(struct rproc *rproc, void *ptr, return -EINVAL; } - mapping = kzalloc_obj(*mapping, GFP_KERNEL); + mapping = kzalloc_obj(*mapping); if (!mapping) return -ENOMEM; @@ -727,7 +727,7 @@ static int rproc_alloc_carveout(struct rproc *rproc, * physical address in this case. */ if (mem->da != FW_RSC_ADDR_ANY && rproc->domain) { - mapping = kzalloc_obj(*mapping, GFP_KERNEL); + mapping = kzalloc_obj(*mapping); if (!mapping) { ret = -ENOMEM; goto dma_free; @@ -917,7 +917,7 @@ rproc_mem_entry_init(struct device *dev, struct rproc_mem_entry *mem; va_list args; - mem = kzalloc_obj(*mem, GFP_KERNEL); + mem = kzalloc_obj(*mem); if (!mem) return mem; @@ -960,7 +960,7 @@ rproc_of_resm_mem_entry_init(struct device *dev, u32 of_resm_idx, size_t len, struct rproc_mem_entry *mem; va_list args; - mem = kzalloc_obj(*mem, GFP_KERNEL); + mem = kzalloc_obj(*mem); if (!mem) return mem; diff --git a/drivers/remoteproc/remoteproc_coredump.c b/drivers/remoteproc/remoteproc_coredump.c index f925c8e775a5..ceff380228c7 100644 --- a/drivers/remoteproc/remoteproc_coredump.c +++ b/drivers/remoteproc/remoteproc_coredump.c @@ -49,7 +49,7 @@ int rproc_coredump_add_segment(struct rproc *rproc, dma_addr_t da, size_t size) { struct rproc_dump_segment *segment; - segment = kzalloc_obj(*segment, GFP_KERNEL); + segment = kzalloc_obj(*segment); if (!segment) return -ENOMEM; @@ -86,7 +86,7 @@ int rproc_coredump_add_custom_segment(struct rproc *rproc, { struct rproc_dump_segment *segment; - segment = kzalloc_obj(*segment, GFP_KERNEL); + segment = kzalloc_obj(*segment); if (!segment) return -ENOMEM; diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index 92c7c0b0ad65..d5e9ff045a28 100644 --- a/drivers/remoteproc/remoteproc_virtio.c +++ b/drivers/remoteproc/remoteproc_virtio.c @@ -430,7 +430,7 @@ static int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id) } /* Allocate virtio device */ - vdev = kzalloc_obj(*vdev, GFP_KERNEL); + vdev = kzalloc_obj(*vdev); if (!vdev) { ret = -ENOMEM; goto out; diff --git a/drivers/remoteproc/stm32_rproc.c b/drivers/remoteproc/stm32_rproc.c index 6185343a6d3f..632614013dc6 100644 --- a/drivers/remoteproc/stm32_rproc.c +++ b/drivers/remoteproc/stm32_rproc.c @@ -164,7 +164,7 @@ static int stm32_rproc_of_memory_translations(struct platform_device *pdev, p_mems = devm_kcalloc(dev, cnt, sizeof(*p_mems), GFP_KERNEL); if (!p_mems) return -ENOMEM; - mem_range = kzalloc_objs(*mem_range, cnt, GFP_KERNEL); + mem_range = kzalloc_objs(*mem_range, cnt); if (!mem_range) return -ENOMEM; diff --git a/drivers/remoteproc/xlnx_r5_remoteproc.c b/drivers/remoteproc/xlnx_r5_remoteproc.c index a8b13fb50992..b71ce69afe9f 100644 --- a/drivers/remoteproc/xlnx_r5_remoteproc.c +++ b/drivers/remoteproc/xlnx_r5_remoteproc.c @@ -265,7 +265,7 @@ static struct mbox_info *zynqmp_r5_setup_mbox(struct device *cdev) struct mbox_client *mbox_cl; struct mbox_info *ipi; - ipi = kzalloc_obj(*ipi, GFP_KERNEL); + ipi = kzalloc_obj(*ipi); if (!ipi) return NULL; @@ -1337,11 +1337,11 @@ static int zynqmp_r5_cluster_init(struct zynqmp_r5_cluster *cluster) core_count = 1; } - child_devs = kzalloc_objs(struct device *, core_count, GFP_KERNEL); + child_devs = kzalloc_objs(struct device *, core_count); if (!child_devs) return -ENOMEM; - r5_cores = kzalloc_objs(struct zynqmp_r5_core *, core_count, GFP_KERNEL); + r5_cores = kzalloc_objs(struct zynqmp_r5_core *, core_count); if (!r5_cores) { kfree(child_devs); return -ENOMEM; @@ -1502,7 +1502,7 @@ static int zynqmp_r5_remoteproc_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; int ret; - cluster = kzalloc_obj(*cluster, GFP_KERNEL); + cluster = kzalloc_obj(*cluster); if (!cluster) return -ENOMEM; |
