Skip to content

Commit 72ebb41

Browse files
committed
soc: fsl: dpio: fix kcalloc() argument order
A previous bugfix added a call to kcalloc(), which starting in gcc-14 causes a harmless warning about the argument order: drivers/soc/fsl/dpio/dpio-service.c: In function 'dpaa2_io_service_enqueue_multiple_desc_fq': drivers/soc/fsl/dpio/dpio-service.c:526:29: error: 'kcalloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 526 | ed = kcalloc(sizeof(struct qbman_eq_desc), 32, GFP_KERNEL); | ^~~~~~ drivers/soc/fsl/dpio/dpio-service.c:526:29: note: earlier argument should specify number of elements, later size of each element Since the two are only multiplied, the order does not change the behavior, so just fix it now to shut up the compiler warning. Dmity independently came up with the same fix. Fixes: 5c4a599 ("soc: fsl: dpio: avoid stack usage warning") Reported-by: Dmitry Antipov <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]>
1 parent a04a7da commit 72ebb41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/soc/fsl/dpio/dpio-service.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ int dpaa2_io_service_enqueue_multiple_desc_fq(struct dpaa2_io *d,
523523
struct qbman_eq_desc *ed;
524524
int i, ret;
525525

526-
ed = kcalloc(sizeof(struct qbman_eq_desc), 32, GFP_KERNEL);
526+
ed = kcalloc(32, sizeof(struct qbman_eq_desc), GFP_KERNEL);
527527
if (!ed)
528528
return -ENOMEM;
529529

0 commit comments

Comments
 (0)