summaryrefslogtreecommitdiff
path: root/drivers/dma
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /drivers/dma
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (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/dma')
-rw-r--r--drivers/dma/acpi-dma.c2
-rw-r--r--drivers/dma/amba-pl08x.c6
-rw-r--r--drivers/dma/at_hdmac.c2
-rw-r--r--drivers/dma/bestcomm/bestcomm.c2
-rw-r--r--drivers/dma/bestcomm/sram.c2
-rw-r--r--drivers/dma/dmaengine.c2
-rw-r--r--drivers/dma/dmatest.c8
-rw-r--r--drivers/dma/dw-edma/dw-edma-pcie.c2
-rw-r--r--drivers/dma/dw/rzn1-dmamux.c2
-rw-r--r--drivers/dma/ep93xx_dma.c2
-rw-r--r--drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c6
-rw-r--r--drivers/dma/fsl-qdma.c2
-rw-r--r--drivers/dma/fsl_raid.c2
-rw-r--r--drivers/dma/fsldma.c4
-rw-r--r--drivers/dma/idxd/cdev.c4
-rw-r--r--drivers/dma/idxd/irq.c2
-rw-r--r--drivers/dma/idxd/perfmon.c4
-rw-r--r--drivers/dma/imx-dma.c2
-rw-r--r--drivers/dma/imx-sdma.c2
-rw-r--r--drivers/dma/ioat/init.c4
-rw-r--r--drivers/dma/mpc512x_dma.c2
-rw-r--r--drivers/dma/mv_xor.c2
-rw-r--r--drivers/dma/of-dma.c4
-rw-r--r--drivers/dma/pch_dma.c2
-rw-r--r--drivers/dma/pl330.c4
-rw-r--r--drivers/dma/plx_dma.c4
-rw-r--r--drivers/dma/ppc4xx/adma.c8
-rw-r--r--drivers/dma/pxa_dma.c2
-rw-r--r--drivers/dma/sa11x0-dma.c4
-rw-r--r--drivers/dma/sh/rz-dmac.c2
-rw-r--r--drivers/dma/sh/shdma-base.c4
-rw-r--r--drivers/dma/stm32/stm32-dmamux.c2
-rw-r--r--drivers/dma/ti/dma-crossbar.c6
-rw-r--r--drivers/dma/ti/k3-udma.c6
-rw-r--r--drivers/dma/ti/omap-dma.c2
-rw-r--r--drivers/dma/timb_dma.c2
36 files changed, 59 insertions, 59 deletions
diff --git a/drivers/dma/acpi-dma.c b/drivers/dma/acpi-dma.c
index d7a033822045..be73021ecbd6 100644
--- a/drivers/dma/acpi-dma.c
+++ b/drivers/dma/acpi-dma.c
@@ -189,7 +189,7 @@ int acpi_dma_controller_register(struct device *dev,
if (!adev)
return -EINVAL;
- adma = kzalloc_obj(*adma, GFP_KERNEL);
+ adma = kzalloc_obj(*adma);
if (!adma)
return -ENOMEM;
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index fb9dad69c314..a960d0467bfc 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -2372,7 +2372,7 @@ static int pl08x_dma_init_virtual_channels(struct pl08x_driver_data *pl08x,
* to cope with that situation.
*/
for (i = 0; i < channels; i++) {
- chan = kzalloc_obj(*chan, GFP_KERNEL);
+ chan = kzalloc_obj(*chan);
if (!chan)
return -ENOMEM;
@@ -2390,7 +2390,7 @@ static int pl08x_dma_init_virtual_channels(struct pl08x_driver_data *pl08x,
chan->signal = i;
pl08x_dma_slave_init(chan);
} else {
- chan->cd = kzalloc_obj(*chan->cd, GFP_KERNEL);
+ chan->cd = kzalloc_obj(*chan->cd);
if (!chan->cd) {
kfree(chan);
return -ENOMEM;
@@ -2709,7 +2709,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
goto out_no_pl08x;
/* Create the driver state holder */
- pl08x = kzalloc_obj(*pl08x, GFP_KERNEL);
+ pl08x = kzalloc_obj(*pl08x);
if (!pl08x) {
ret = -ENOMEM;
goto out_no_pl08x;
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 935e3264ccec..e5b30a57c477 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1818,7 +1818,7 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,
dma_cap_zero(mask);
dma_cap_set(DMA_SLAVE, mask);
- atslave = kmalloc_obj(*atslave, GFP_KERNEL);
+ atslave = kmalloc_obj(*atslave);
if (!atslave) {
put_device(&dmac_pdev->dev);
return NULL;
diff --git a/drivers/dma/bestcomm/bestcomm.c b/drivers/dma/bestcomm/bestcomm.c
index e1b259c781ca..432b43520ddc 100644
--- a/drivers/dma/bestcomm/bestcomm.c
+++ b/drivers/dma/bestcomm/bestcomm.c
@@ -393,7 +393,7 @@ static int mpc52xx_bcom_probe(struct platform_device *op)
}
/* Get a clean struct */
- bcom_eng = kzalloc_obj(struct bcom_engine, GFP_KERNEL);
+ bcom_eng = kzalloc_obj(struct bcom_engine);
if (!bcom_eng) {
rv = -ENOMEM;
goto error_sramclean;
diff --git a/drivers/dma/bestcomm/sram.c b/drivers/dma/bestcomm/sram.c
index c34639c30986..09ef5142c26c 100644
--- a/drivers/dma/bestcomm/sram.c
+++ b/drivers/dma/bestcomm/sram.c
@@ -48,7 +48,7 @@ int bcom_sram_init(struct device_node *sram_node, char *owner)
return -EBUSY;
}
- bcom_sram = kmalloc_obj(struct bcom_sram, GFP_KERNEL);
+ bcom_sram = kmalloc_obj(struct bcom_sram);
if (!bcom_sram) {
printk(KERN_ERR "%s: bcom_sram_init: "
"Couldn't allocate internal state !\n", owner);
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index b43a7b3a6a8d..27a8980b03dd 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -1075,7 +1075,7 @@ static int __dma_async_device_channel_register(struct dma_device *device,
chan->local = alloc_percpu(typeof(*chan->local));
if (!chan->local)
return -ENOMEM;
- chan->dev = kzalloc_obj(*chan->dev, GFP_KERNEL);
+ chan->dev = kzalloc_obj(*chan->dev);
if (!chan->dev) {
rc = -ENOMEM;
goto err_free_local;
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 1a18b8985afc..df38681a1ff4 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -677,11 +677,11 @@ static int dmatest_func(void *data)
set_user_nice(current, 10);
- srcs = kzalloc_objs(dma_addr_t, src->cnt, GFP_KERNEL);
+ srcs = kzalloc_objs(dma_addr_t, src->cnt);
if (!srcs)
goto err_dst;
- dma_pq = kzalloc_objs(dma_addr_t, dst->cnt, GFP_KERNEL);
+ dma_pq = kzalloc_objs(dma_addr_t, dst->cnt);
if (!dma_pq)
goto err_srcs_array;
@@ -987,7 +987,7 @@ static int dmatest_add_threads(struct dmatest_info *info,
return -EINVAL;
for (i = 0; i < params->threads_per_chan; i++) {
- thread = kzalloc_obj(struct dmatest_thread, GFP_KERNEL);
+ thread = kzalloc_obj(struct dmatest_thread);
if (!thread) {
pr_warn("No memory for %s-%s%u\n",
dma_chan_name(chan), op, i);
@@ -1025,7 +1025,7 @@ static int dmatest_add_channel(struct dmatest_info *info,
unsigned int thread_count = 0;
int cnt;
- dtc = kmalloc_obj(struct dmatest_chan, GFP_KERNEL);
+ dtc = kmalloc_obj(struct dmatest_chan);
if (!dtc) {
pr_warn("No memory for %s\n", dma_chan_name(chan));
return -ENOMEM;
diff --git a/drivers/dma/dw-edma/dw-edma-pcie.c b/drivers/dma/dw-edma/dw-edma-pcie.c
index df599b563124..83230acaa597 100644
--- a/drivers/dma/dw-edma/dw-edma-pcie.c
+++ b/drivers/dma/dw-edma/dw-edma-pcie.c
@@ -167,7 +167,7 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
int i, mask;
struct dw_edma_pcie_data *vsec_data __free(kfree) =
- kmalloc_obj(*vsec_data, GFP_KERNEL);
+ kmalloc_obj(*vsec_data);
if (!vsec_data)
return -ENOMEM;
diff --git a/drivers/dma/dw/rzn1-dmamux.c b/drivers/dma/dw/rzn1-dmamux.c
index b0b4ccae2c77..fb495ee6edfc 100644
--- a/drivers/dma/dw/rzn1-dmamux.c
+++ b/drivers/dma/dw/rzn1-dmamux.c
@@ -53,7 +53,7 @@ static void *rzn1_dmamux_route_allocate(struct of_phandle_args *dma_spec,
goto put_device;
}
- map = kzalloc_obj(*map, GFP_KERNEL);
+ map = kzalloc_obj(*map);
if (!map) {
ret = -ENOMEM;
goto put_device;
diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index 375f608c8266..8eceb96d058c 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -966,7 +966,7 @@ static int ep93xx_dma_alloc_chan_resources(struct dma_chan *chan)
for (i = 0; i < DMA_MAX_CHAN_DESCRIPTORS; i++) {
struct ep93xx_dma_desc *desc;
- desc = kzalloc_obj(*desc, GFP_KERNEL);
+ desc = kzalloc_obj(*desc);
if (!desc) {
dev_warn(chan2dev(edmac), "not enough descriptors\n");
break;
diff --git a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
index 206e6bdaf99d..bf771251264d 100644
--- a/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
+++ b/drivers/dma/fsl-dpaa2-qdma/dpaa2-qdma.c
@@ -353,7 +353,7 @@ static int __cold dpaa2_qdma_setup(struct fsl_mc_device *ls_dev)
}
priv->num_pairs = min(priv->dpdmai_attr.num_of_priorities, prio_def);
- ppriv = kzalloc_objs(*ppriv, priv->num_pairs, GFP_KERNEL);
+ ppriv = kzalloc_objs(*ppriv, priv->num_pairs);
if (!ppriv) {
err = -ENOMEM;
goto exit;
@@ -659,7 +659,7 @@ static int dpaa2_qdma_probe(struct fsl_mc_device *dpdmai_dev)
struct dpaa2_qdma_priv *priv;
int err;
- priv = kzalloc_obj(*priv, GFP_KERNEL);
+ priv = kzalloc_obj(*priv);
if (!priv)
return -ENOMEM;
dev_set_drvdata(dev, priv);
@@ -707,7 +707,7 @@ static int dpaa2_qdma_probe(struct fsl_mc_device *dpdmai_dev)
goto err_enable;
}
- dpaa2_qdma = kzalloc_obj(*dpaa2_qdma, GFP_KERNEL);
+ dpaa2_qdma = kzalloc_obj(*dpaa2_qdma);
if (!dpaa2_qdma) {
err = -ENOMEM;
goto err_eng;
diff --git a/drivers/dma/fsl-qdma.c b/drivers/dma/fsl-qdma.c
index db863bf7b0e6..0bbff9df362f 100644
--- a/drivers/dma/fsl-qdma.c
+++ b/drivers/dma/fsl-qdma.c
@@ -406,7 +406,7 @@ static int fsl_qdma_pre_request_enqueue_desc(struct fsl_qdma_queue *queue)
struct fsl_qdma_comp *comp_temp, *_comp_temp;
for (i = 0; i < queue->n_cq + FSL_COMMAND_QUEUE_OVERFLLOW; i++) {
- comp_temp = kzalloc_obj(*comp_temp, GFP_KERNEL);
+ comp_temp = kzalloc_obj(*comp_temp);
if (!comp_temp)
goto err_alloc;
comp_temp->virt_addr =
diff --git a/drivers/dma/fsl_raid.c b/drivers/dma/fsl_raid.c
index 5ba9a14bb78a..99945845d8b5 100644
--- a/drivers/dma/fsl_raid.c
+++ b/drivers/dma/fsl_raid.c
@@ -579,7 +579,7 @@ static int fsl_re_alloc_chan_resources(struct dma_chan *chan)
re_chan = container_of(chan, struct fsl_re_chan, chan);
for (i = 0; i < FSL_RE_MIN_DESCS; i++) {
- desc = kzalloc_obj(*desc, GFP_KERNEL);
+ desc = kzalloc_obj(*desc);
if (!desc)
break;
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 1525b6fe54b4..22d62d958abd 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -1111,7 +1111,7 @@ static int fsl_dma_chan_probe(struct fsldma_device *fdev,
int err;
/* alloc channel */
- chan = kzalloc_obj(*chan, GFP_KERNEL);
+ chan = kzalloc_obj(*chan);
if (!chan) {
err = -ENOMEM;
goto out_return;
@@ -1218,7 +1218,7 @@ static int fsldma_of_probe(struct platform_device *op)
unsigned int i;
int err;
- fdev = kzalloc_obj(*fdev, GFP_KERNEL);
+ fdev = kzalloc_obj(*fdev);
if (!fdev) {
err = -ENOMEM;
goto out_return;
diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
index 49fcc429d262..c37d233535f9 100644
--- a/drivers/dma/idxd/cdev.c
+++ b/drivers/dma/idxd/cdev.c
@@ -232,7 +232,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
dev_dbg(dev, "%s called: %d\n", __func__, idxd_wq_refcount(wq));
- ctx = kzalloc_obj(*ctx, GFP_KERNEL);
+ ctx = kzalloc_obj(*ctx);
if (!ctx)
return -ENOMEM;
@@ -538,7 +538,7 @@ int idxd_wq_add_cdev(struct idxd_wq *wq)
struct idxd_cdev_context *cdev_ctx;
int rc, minor;
- idxd_cdev = kzalloc_obj(*idxd_cdev, GFP_KERNEL);
+ idxd_cdev = kzalloc_obj(*idxd_cdev);
if (!idxd_cdev)
return -ENOMEM;
diff --git a/drivers/dma/idxd/irq.c b/drivers/dma/idxd/irq.c
index 976d8aaa4517..7782f8c51c32 100644
--- a/drivers/dma/idxd/irq.c
+++ b/drivers/dma/idxd/irq.c
@@ -567,7 +567,7 @@ bool idxd_queue_int_handle_resubmit(struct idxd_desc *desc)
struct idxd_device *idxd = wq->idxd;
struct idxd_resubmit *irw;
- irw = kzalloc_obj(*irw, GFP_KERNEL);
+ irw = kzalloc_obj(*irw);
if (!irw)
return false;
diff --git a/drivers/dma/idxd/perfmon.c b/drivers/dma/idxd/perfmon.c
index 3283841d3ddc..f854bd31a4f5 100644
--- a/drivers/dma/idxd/perfmon.c
+++ b/drivers/dma/idxd/perfmon.c
@@ -128,7 +128,7 @@ static int perfmon_validate_group(struct idxd_pmu *pmu,
struct idxd_pmu *fake_pmu;
int i, ret = 0, n, idx;
- fake_pmu = kzalloc_obj(*fake_pmu, GFP_KERNEL);
+ fake_pmu = kzalloc_obj(*fake_pmu);
if (!fake_pmu)
return -ENOMEM;
@@ -484,7 +484,7 @@ int perfmon_pmu_init(struct idxd_device *idxd)
if (idxd->perfmon_offset == 0)
return -ENODEV;
- idxd_pmu = kzalloc_obj(*idxd_pmu, GFP_KERNEL);
+ idxd_pmu = kzalloc_obj(*idxd_pmu);
if (!idxd_pmu)
return -ENOMEM;
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index d20c14f297a7..81c6276436f8 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -746,7 +746,7 @@ static int imxdma_alloc_chan_resources(struct dma_chan *chan)
while (imxdmac->descs_allocated < IMXDMA_MAX_CHAN_DESCRIPTORS) {
struct imxdma_desc *desc;
- desc = kzalloc_obj(*desc, GFP_KERNEL);
+ desc = kzalloc_obj(*desc);
if (!desc)
break;
dma_async_tx_descriptor_init(&desc->desc, chan);
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 4093fba9cc23..4c8196d78001 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -2288,7 +2288,7 @@ static int sdma_probe(struct platform_device *pdev)
sdma->irq = irq;
- sdma->script_addrs = kzalloc_obj(*sdma->script_addrs, GFP_KERNEL);
+ sdma->script_addrs = kzalloc_obj(*sdma->script_addrs);
if (!sdma->script_addrs) {
ret = -ENOMEM;
goto err_irq;
diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c
index a4e539e48444..737496391109 100644
--- a/drivers/dma/ioat/init.c
+++ b/drivers/dma/ioat/init.c
@@ -574,7 +574,7 @@ static void ioat_enumerate_channels(struct ioatdma_device *ioat_dma)
dev_dbg(dev, "%s: xfercap = %d\n", __func__, 1 << xfercap_log);
for (i = 0; i < chancnt; i++) {
- ioat_chan = kzalloc_obj(*ioat_chan, GFP_KERNEL);
+ ioat_chan = kzalloc_obj(*ioat_chan);
if (!ioat_chan)
break;
@@ -1332,7 +1332,7 @@ static void release_ioatdma(struct dma_device *device)
static struct ioatdma_device *
alloc_ioatdma(struct pci_dev *pdev, void __iomem *iobase)
{
- struct ioatdma_device *d = kzalloc_obj(*d, GFP_KERNEL);
+ struct ioatdma_device *d = kzalloc_obj(*d);
if (!d)
return NULL;
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c
index 37550b42c30e..0adc8e01057e 100644
--- a/drivers/dma/mpc512x_dma.c
+++ b/drivers/dma/mpc512x_dma.c
@@ -503,7 +503,7 @@ static int mpc_dma_alloc_chan_resources(struct dma_chan *chan)
/* Alloc descriptors for this channel */
for (i = 0; i < MPC_DMA_DESCRIPTORS; i++) {
- mdesc = kzalloc_obj(struct mpc_dma_desc, GFP_KERNEL);
+ mdesc = kzalloc_obj(struct mpc_dma_desc);
if (!mdesc) {
dev_notice(mdma->dma.dev,
"Memory allocation error. Allocated only %u descriptors\n", i);
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index f4f65ef44234..25ed61f1b089 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -443,7 +443,7 @@ static int mv_xor_alloc_chan_resources(struct dma_chan *chan)
/* Allocate descriptor slots */
idx = mv_chan->slots_allocated;
while (idx < num_descs_in_pool) {
- slot = kzalloc_obj(*slot, GFP_KERNEL);
+ slot = kzalloc_obj(*slot);
if (!slot) {
dev_info(mv_chan_to_devp(mv_chan),
"channel only initialized %d descriptor slots",
diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
index d27c74f1669b..53d11063a4f2 100644
--- a/drivers/dma/of-dma.c
+++ b/drivers/dma/of-dma.c
@@ -127,7 +127,7 @@ int of_dma_controller_register(struct device_node *np,
return -EINVAL;
}
- ofdma = kzalloc_obj(*ofdma, GFP_KERNEL);
+ ofdma = kzalloc_obj(*ofdma);
if (!ofdma)
return -ENOMEM;
@@ -194,7 +194,7 @@ int of_dma_router_register(struct device_node *np,
return -EINVAL;
}
- ofdma = kzalloc_obj(*ofdma, GFP_KERNEL);
+ ofdma = kzalloc_obj(*ofdma);
if (!ofdma)
return -ENOMEM;
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index 69560dd8c365..e9fbfd5a3d51 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -806,7 +806,7 @@ static int pch_dma_probe(struct pci_dev *pdev,
int i;
nr_channels = id->driver_data;
- pd = kzalloc_obj(*pd, GFP_KERNEL);
+ pd = kzalloc_obj(*pd);
if (!pd)
return -ENOMEM;
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 996c259107e3..25ba84b18704 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -1887,7 +1887,7 @@ static int dmac_alloc_threads(struct pl330_dmac *pl330)
int i;
/* Allocate 1 Manager and 'chans' Channel threads */
- pl330->channels = kzalloc_objs(*thrd, 1 + chans, GFP_KERNEL);
+ pl330->channels = kzalloc_objs(*thrd, 1 + chans);
if (!pl330->channels)
return -ENOMEM;
@@ -3092,7 +3092,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
pl330->num_peripherals = num_chan;
- pl330->peripherals = kzalloc_objs(*pch, num_chan, GFP_KERNEL);
+ pl330->peripherals = kzalloc_objs(*pch, num_chan);
if (!pl330->peripherals) {
ret = -ENOMEM;
goto probe_err2;
diff --git a/drivers/dma/plx_dma.c b/drivers/dma/plx_dma.c
index 1958fa8f96e4..33354fc35a43 100644
--- a/drivers/dma/plx_dma.c
+++ b/drivers/dma/plx_dma.c
@@ -384,7 +384,7 @@ static int plx_dma_alloc_desc(struct plx_dma_dev *plxdev)
return -ENOMEM;
for (i = 0; i < PLX_DMA_RING_COUNT; i++) {
- desc = kzalloc_obj(*desc, GFP_KERNEL);
+ desc = kzalloc_obj(*desc);
if (!desc)
goto free_and_exit;
@@ -501,7 +501,7 @@ static int plx_dma_create(struct pci_dev *pdev)
struct dma_chan *chan;
int rc;
- plxdev = kzalloc_obj(*plxdev, GFP_KERNEL);
+ plxdev = kzalloc_obj(*plxdev);
if (!plxdev)
return -ENOMEM;
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index 7c08e80dcc4c..279a431ccae3 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -1781,7 +1781,7 @@ static int ppc440spe_adma_alloc_chan_resources(struct dma_chan *chan)
db_sz = sizeof(struct xor_cb);
for (; i < (ppc440spe_chan->device->pool_size / db_sz); i++) {
- slot = kzalloc_obj(struct ppc440spe_adma_desc_slot, GFP_KERNEL);
+ slot = kzalloc_obj(struct ppc440spe_adma_desc_slot);
if (!slot) {
printk(KERN_INFO "SPE ADMA Channel only initialized"
" %d descriptor slots", i--);
@@ -4063,7 +4063,7 @@ static int ppc440spe_adma_probe(struct platform_device *ofdev)
}
/* create a device */
- adev = kzalloc_obj(*adev, GFP_KERNEL);
+ adev = kzalloc_obj(*adev);
if (!adev) {
initcode = PPC_ADMA_INIT_ALLOC;
ret = -ENOMEM;
@@ -4123,7 +4123,7 @@ static int ppc440spe_adma_probe(struct platform_device *ofdev)
platform_set_drvdata(ofdev, adev);
/* create a channel */
- chan = kzalloc_obj(*chan, GFP_KERNEL);
+ chan = kzalloc_obj(*chan);
if (!chan) {
initcode = PPC_ADMA_INIT_CHANNEL;
ret = -ENOMEM;
@@ -4160,7 +4160,7 @@ static int ppc440spe_adma_probe(struct platform_device *ofdev)
PAGE_SIZE, DMA_BIDIRECTIONAL);
}
- ref = kmalloc_obj(*ref, GFP_KERNEL);
+ ref = kmalloc_obj(*ref);
if (ref) {
ref->chan = &chan->common;
INIT_LIST_HEAD(&ref->node);
diff --git a/drivers/dma/pxa_dma.c b/drivers/dma/pxa_dma.c
index a48ba9fc9f49..fa2ee0b3e09f 100644
--- a/drivers/dma/pxa_dma.c
+++ b/drivers/dma/pxa_dma.c
@@ -342,7 +342,7 @@ static void pxad_init_debugfs(struct pxad_device *pdev)
struct dentry *chandir;
pdev->dbgfs_chan =
- kmalloc_objs(struct dentry *, pdev->nr_chans, GFP_KERNEL);
+ kmalloc_objs(struct dentry *, pdev->nr_chans);
if (!pdev->dbgfs_chan)
return;
diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c
index bcbdaf75db15..a6fa431530e3 100644
--- a/drivers/dma/sa11x0-dma.c
+++ b/drivers/dma/sa11x0-dma.c
@@ -848,7 +848,7 @@ static int sa11x0_dma_init_dmadev(struct dma_device *dmadev,
for (i = 0; i < ARRAY_SIZE(chan_desc); i++) {
struct sa11x0_dma_chan *c;
- c = kzalloc_obj(*c, GFP_KERNEL);
+ c = kzalloc_obj(*c);
if (!c) {
dev_err(dev, "no memory for channel %u\n", i);
return -ENOMEM;
@@ -907,7 +907,7 @@ static int sa11x0_dma_probe(struct platform_device *pdev)
if (!res)
return -ENXIO;
- d = kzalloc_obj(*d, GFP_KERNEL);
+ d = kzalloc_obj(*d);
if (!d) {
ret = -ENOMEM;
goto err_alloc;
diff --git a/drivers/dma/sh/rz-dmac.c b/drivers/dma/sh/rz-dmac.c
index 7f9b45c4553d..d84ca551b2bf 100644
--- a/drivers/dma/sh/rz-dmac.c
+++ b/drivers/dma/sh/rz-dmac.c
@@ -443,7 +443,7 @@ static int rz_dmac_alloc_chan_resources(struct dma_chan *chan)
while (channel->descs_allocated < RZ_DMAC_MAX_CHAN_DESCRIPTORS) {
struct rz_dmac_desc *desc;
- desc = kzalloc_obj(*desc, GFP_KERNEL);
+ desc = kzalloc_obj(*desc);
if (!desc)
break;
diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
index 59eab919a3e3..89a78e685b1d 100644
--- a/drivers/dma/sh/shdma-base.c
+++ b/drivers/dma/sh/shdma-base.c
@@ -740,7 +740,7 @@ static struct dma_async_tx_descriptor *shdma_prep_dma_cyclic(
* Allocate the sg list dynamically as it would consume too much stack
* space.
*/
- sgl = kmalloc_objs(*sgl, sg_len, GFP_KERNEL);
+ sgl = kmalloc_objs(*sgl, sg_len);
if (!sgl)
return NULL;
@@ -1012,7 +1012,7 @@ int shdma_init(struct device *dev, struct shdma_dev *sdev,
!sdev->ops->desc_completed)
return -EINVAL;
- sdev->schan = kzalloc_objs(*sdev->schan, chan_num, GFP_KERNEL);
+ sdev->schan = kzalloc_objs(*sdev->schan, chan_num);
if (!sdev->schan)
return -ENOMEM;
diff --git a/drivers/dma/stm32/stm32-dmamux.c b/drivers/dma/stm32/stm32-dmamux.c
index 4abd5ba32969..57318715d9f3 100644
--- a/drivers/dma/stm32/stm32-dmamux.c
+++ b/drivers/dma/stm32/stm32-dmamux.c
@@ -104,7 +104,7 @@ static void *stm32_dmamux_route_allocate(struct of_phandle_args *dma_spec,
goto err_put_pdev;
}
- mux = kzalloc_obj(*mux, GFP_KERNEL);
+ mux = kzalloc_obj(*mux);
if (!mux) {
ret = -ENOMEM;
goto err_put_pdev;
diff --git a/drivers/dma/ti/dma-crossbar.c b/drivers/dma/ti/dma-crossbar.c
index cf1ceab10f14..f6d75ee94e8d 100644
--- a/drivers/dma/ti/dma-crossbar.c
+++ b/drivers/dma/ti/dma-crossbar.c
@@ -103,7 +103,7 @@ static void *ti_am335x_xbar_route_allocate(struct of_phandle_args *dma_spec,
goto out_put_pdev;
}
- map = kzalloc_obj(*map, GFP_KERNEL);
+ map = kzalloc_obj(*map);
if (!map) {
of_node_put(dma_spec->np);
map = ERR_PTR(-ENOMEM);
@@ -260,7 +260,7 @@ static void *ti_dra7_xbar_route_allocate(struct of_phandle_args *dma_spec,
goto out_put_pdev;
}
- map = kzalloc_obj(*map, GFP_KERNEL);
+ map = kzalloc_obj(*map);
if (!map) {
of_node_put(dma_spec->np);
map = ERR_PTR(-ENOMEM);
@@ -393,7 +393,7 @@ static int ti_dra7_xbar_probe(struct platform_device *pdev)
if (!nelm)
return -EINVAL;
- rsv_events = kzalloc_objs(*rsv_events, nelm, GFP_KERNEL);
+ rsv_events = kzalloc_objs(*rsv_events, nelm);
if (!rsv_events)
return -ENOMEM;
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index b547b19bc9d8..c964ebfcf3b6 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -4686,7 +4686,7 @@ static int udma_setup_resources(struct udma_dev *ud)
irq_res.sets += rm_res->sets;
}
- irq_res.desc = kzalloc_objs(*irq_res.desc, irq_res.sets, GFP_KERNEL);
+ irq_res.desc = kzalloc_objs(*irq_res.desc, irq_res.sets);
if (!irq_res.desc)
return -ENOMEM;
rm_res = tisci_rm->rm_ranges[RM_RANGE_TCHAN];
@@ -4878,7 +4878,7 @@ static int bcdma_setup_resources(struct udma_dev *ud)
}
}
- irq_res.desc = kzalloc_objs(*irq_res.desc, irq_res.sets, GFP_KERNEL);
+ irq_res.desc = kzalloc_objs(*irq_res.desc, irq_res.sets);
if (!irq_res.desc)
return -ENOMEM;
if (ud->bchan_cnt) {
@@ -5080,7 +5080,7 @@ static int pktdma_setup_resources(struct udma_dev *ud)
irq_res.sets += rm_res->sets;
}
- irq_res.desc = kzalloc_objs(*irq_res.desc, irq_res.sets, GFP_KERNEL);
+ irq_res.desc = kzalloc_objs(*irq_res.desc, irq_res.sets);
if (!irq_res.desc)
return -ENOMEM;
rm_res = tisci_rm->rm_ranges[RM_RANGE_TFLOW];
diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c
index 70591c2bf92a..55ece7fd0d99 100644
--- a/drivers/dma/ti/omap-dma.c
+++ b/drivers/dma/ti/omap-dma.c
@@ -1503,7 +1503,7 @@ static int omap_dma_chan_init(struct omap_dmadev *od)
{
struct omap_chan *c;
- c = kzalloc_obj(*c, GFP_KERNEL);
+ c = kzalloc_obj(*c);
if (!c)
return -ENOMEM;
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index 968f8cf19ec0..6f5a214954a5 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -325,7 +325,7 @@ static struct timb_dma_desc *td_alloc_init_desc(struct timb_dma_chan *td_chan)
struct timb_dma_desc *td_desc;
int err;
- td_desc = kzalloc_obj(struct timb_dma_desc, GFP_KERNEL);
+ td_desc = kzalloc_obj(struct timb_dma_desc);
if (!td_desc)
goto out;