[PATCH v2 5/8] dmadev: fix calloc parameters
Morten Brørup
mb at smartsharesystems.com
Wed Jan 24 19:59:54 CET 2024
> From: Ferruh Yigit [mailto:ferruh.yigit at amd.com]
> Sent: Wednesday, 24 January 2024 19.54
> To: Chengwen Feng; Kevin Laatz; Bruce Richardson; Morten Brørup
> Cc: dev at dpdk.org; stable at dpdk.org
> Subject: [PATCH v2 5/8] dmadev: fix calloc parameters
>
> gcc [1] generates warning [2] about calloc usage, because calloc
> parameter order is wrong, fixing it by replacing parameters.
>
> [1]
> gcc (GCC) 14.0.1 20240124 (experimental)
>
> [2]
> Compiling C object lib/librte_dmadev.a.p/dmadev_rte_dmadev.c.o
> ../lib/dmadev/rte_dmadev.c: In function ‘dmadev_handle_dev_dump’:
> ../lib/dmadev/rte_dmadev.c:1033:29:
> warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
> argument and not in the later argument [-Wcalloc-transposed-args]
> 1033 | buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
> | ^~~~
>
> Fixes: 94043b04212a ("dmadev: support telemetry dump dmadev")
> Cc: stable at dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
> ---
Acked-by: Morten Brørup <mb at smartsharesystems.com>
More information about the stable
mailing list