From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
Liang Ma <liangma@liangbit.com>,
Peter Mccarthy <peter.mccarthy@intel.com>,
Harry van Haaren <harry.van.haaren@intel.com>,
Amit Prakash Shukla <amitprakashs@marvell.com>,
Jerin Jacob <jerinj@marvell.com>
Subject: [PATCH] eventdev: replace zero-length-array
Date: Tue, 1 Oct 2024 15:01:14 -0700 [thread overview]
Message-ID: <20241001220114.423998-1-stephen@networkplumber.org> (raw)
Zero Length Array's (ZLA) are a Gcc extension, and standard
Variable Length Array (VLA) should be used instead.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/event/opdl/opdl_ring.c | 2 +-
drivers/event/sw/event_ring.h | 2 +-
lib/eventdev/rte_event_dma_adapter.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/event/opdl/opdl_ring.c b/drivers/event/opdl/opdl_ring.c
index 6799ec996b..60991c4b03 100644
--- a/drivers/event/opdl/opdl_ring.c
+++ b/drivers/event/opdl/opdl_ring.c
@@ -119,7 +119,7 @@ struct opdl_ring {
/* Stages indexed by ID */
struct opdl_stage *stages;
/* Memory for storing slot data */
- alignas(RTE_CACHE_LINE_SIZE) uint8_t slots[0];
+ alignas(RTE_CACHE_LINE_SIZE) uint8_t slots[];
};
diff --git a/drivers/event/sw/event_ring.h b/drivers/event/sw/event_ring.h
index 29db267b77..35931888dd 100644
--- a/drivers/event/sw/event_ring.h
+++ b/drivers/event/sw/event_ring.h
@@ -27,7 +27,7 @@ struct rob_ring {
uint32_t size;
uint32_t write_idx;
uint32_t read_idx;
- alignas(RTE_CACHE_LINE_SIZE) void *ring[0];
+ alignas(RTE_CACHE_LINE_SIZE) void *ring[];
};
static inline struct rob_ring *
diff --git a/lib/eventdev/rte_event_dma_adapter.h b/lib/eventdev/rte_event_dma_adapter.h
index 768390cd30..5c480b82ff 100644
--- a/lib/eventdev/rte_event_dma_adapter.h
+++ b/lib/eventdev/rte_event_dma_adapter.h
@@ -204,7 +204,7 @@ struct rte_event_dma_adapter_op {
/**< Number of source segments. */
uint16_t nb_dst;
/**< Number of destination segments. */
- struct rte_dma_sge src_dst_seg[0];
+ struct rte_dma_sge src_dst_seg[];
/**< Source and destination segments. */
};
--
2.45.2
next reply other threads:[~2024-10-01 22:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-01 22:01 Stephen Hemminger [this message]
2024-10-03 15:59 ` [PATCH] eventdev: replace zero-length-array Jerin Jacob
2024-10-03 16:41 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241001220114.423998-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=amitprakashs@marvell.com \
--cc=dev@dpdk.org \
--cc=harry.van.haaren@intel.com \
--cc=jerinj@marvell.com \
--cc=liangma@liangbit.com \
--cc=peter.mccarthy@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.