[PATCH] dmadev: replace zero length array
Bruce Richardson
bruce.richardson at intel.com
Thu Oct 16 10:15:04 CEST 2025
On Wed, Oct 15, 2025 at 11:59:46AM -0700, Stephen Hemminger wrote:
> Use of zero length arrays is Gcc extension.
> Found by zero_length_array.cocci.
>
> Fixes: 9674119fbf27 ("dmadev: add enqueue/dequeue operations")
> Cc: pbhagavatula at marvell.com
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> lib/dmadev/rte_dmadev.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h
> index 30e168825e..8ae9ee031b 100644
> --- a/lib/dmadev/rte_dmadev.h
> +++ b/lib/dmadev/rte_dmadev.h
> @@ -856,7 +856,7 @@ struct rte_dma_op {
> /** Number of destination segments. */
> uint16_t nb_dst;
> /** Source and destination segments. */
> - struct rte_dma_sge src_dst_seg[0];
> + struct rte_dma_sge src_dst_seg[];
> };
>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
More information about the dev
mailing list