summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-09-05 20:45:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2026-09-05 20:45:18 -0700
commit1fc5a74b108fc90951890ec513ac81869f5eaff1 (patch)
treeddd247abac0e8e148e4ded357db093bee4fe35ed /drivers/dma
parent9f0346dcbea363787186c94ef94dd01aaa215afa (diff)
parent3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d (diff)
downloadlinux-stable-1fc5a74b108fc90951890ec513ac81869f5eaff1.tar.gz
linux-stable-1fc5a74b108fc90951890ec513ac81869f5eaff1.zip
Merge tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull kmalloc_obj conversions from Kees Cook: "Another run of the Coccinelle script for converting kmalloc() family of allocations to kmalloc_obj() via the existing rules in scripts/coccinelle/api/kmalloc_objs.cocci" * tag 'kmalloc_obj-v7.3-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: treewide: refresh kmalloc_obj() conversions drm/amd/display: Fix harmless type mismatch in allocation
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/switchtec_dma.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/dma/switchtec_dma.c b/drivers/dma/switchtec_dma.c
index c133535d3..c8e216987 100644
--- a/drivers/dma/switchtec_dma.c
+++ b/drivers/dma/switchtec_dma.c
@@ -1056,7 +1056,7 @@ static int switchtec_dma_chan_init(struct switchtec_dma_dev *swdma_dev,
int se_buf_len, irq, rc;
struct dma_chan *chan;
- swdma_chan = kzalloc_obj(*swdma_chan, GFP_KERNEL);
+ swdma_chan = kzalloc_obj(*swdma_chan);
if (!swdma_chan)
return -ENOMEM;
@@ -1162,8 +1162,7 @@ static int switchtec_dma_chans_enumerate(struct switchtec_dma_dev *swdma_dev,
struct dma_device *dma = &swdma_dev->dma_dev;
int base, cnt, rc, i;
- swdma_dev->swdma_chans = kcalloc(chan_cnt, sizeof(*swdma_dev->swdma_chans),
- GFP_KERNEL);
+ swdma_dev->swdma_chans = kzalloc_objs(*swdma_dev->swdma_chans, chan_cnt);
if (!swdma_dev->swdma_chans)
return -ENOMEM;
@@ -1222,7 +1221,7 @@ static int switchtec_dma_create(struct pci_dev *pdev)
/*
* Create the switchtec dma device
*/
- swdma_dev = kzalloc_obj(*swdma_dev, GFP_KERNEL);
+ swdma_dev = kzalloc_obj(*swdma_dev);
if (!swdma_dev)
return -ENOMEM;