aboutsummaryrefslogtreecommitdiff
path: root/ce.c
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2026-04-13 22:25:41 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2026-04-13 22:25:41 +0000
commitbbc9d102496a6ee93c55d32a9ce40d2f737fc9e7 (patch)
treee7dc0bb81dec3af67dc8337addd7987fbb224df5 /ce.c
parent91a3131f2f8e4db6b8b7999fed893ff2bedb0d2d (diff)
Diffstat (limited to 'ce.c')
-rw-r--r--ce.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/ce.c b/ce.c
index 82f120ee1c66..a9cbe955e084 100644
--- a/ce.c
+++ b/ce.c
@@ -1461,8 +1461,7 @@ ath10k_ce_alloc_src_ring(struct ath10k *ar, unsigned int ce_id,
nentries = roundup_pow_of_two(nentries);
- src_ring = kzalloc(struct_size(src_ring, per_transfer_context,
- nentries), GFP_KERNEL);
+ src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries);
if (src_ring == NULL)
return ERR_PTR(-ENOMEM);
@@ -1519,8 +1518,7 @@ ath10k_ce_alloc_src_ring_64(struct ath10k *ar, unsigned int ce_id,
nentries = roundup_pow_of_two(nentries);
- src_ring = kzalloc(struct_size(src_ring, per_transfer_context,
- nentries), GFP_KERNEL);
+ src_ring = kzalloc_flex(*src_ring, per_transfer_context, nentries);
if (!src_ring)
return ERR_PTR(-ENOMEM);
@@ -1575,8 +1573,7 @@ ath10k_ce_alloc_dest_ring(struct ath10k *ar, unsigned int ce_id,
nentries = roundup_pow_of_two(attr->dest_nentries);
- dest_ring = kzalloc(struct_size(dest_ring, per_transfer_context,
- nentries), GFP_KERNEL);
+ dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries);
if (dest_ring == NULL)
return ERR_PTR(-ENOMEM);
@@ -1619,8 +1616,7 @@ ath10k_ce_alloc_dest_ring_64(struct ath10k *ar, unsigned int ce_id,
nentries = roundup_pow_of_two(attr->dest_nentries);
- dest_ring = kzalloc(struct_size(dest_ring, per_transfer_context,
- nentries), GFP_KERNEL);
+ dest_ring = kzalloc_flex(*dest_ring, per_transfer_context, nentries);
if (!dest_ring)
return ERR_PTR(-ENOMEM);