DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] ethdev: add extension keyword to statement expression macro
@ 2023-11-09 20:13 Tyler Retzlaff
  2023-11-10 17:22 ` Ferruh Yigit
  0 siblings, 1 reply; 8+ messages in thread
From: Tyler Retzlaff @ 2023-11-09 20:13 UTC (permalink / raw)
  To: dev
  Cc: Andrew Rybchenko, Cristian Dumitrescu, Ferruh Yigit,
	Thomas Monjalon, Tyler Retzlaff

add missing __extension__ keyword to macros using gcc statement
expression extension.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/ethdev/rte_mtr.c | 10 +++++-----
 lib/ethdev/rte_tm.c  |  6 +++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/ethdev/rte_mtr.c b/lib/ethdev/rte_mtr.c
index 4e94af9..900837b 100644
--- a/lib/ethdev/rte_mtr.c
+++ b/lib/ethdev/rte_mtr.c
@@ -41,14 +41,14 @@
 }
 
 #define RTE_MTR_FUNC(port_id, func)			\
-({							\
+__extension__ ({					\
 	const struct rte_mtr_ops *ops =			\
-		rte_mtr_ops_get(port_id, error);		\
-	if (ops == NULL)					\
+		rte_mtr_ops_get(port_id, error);	\
+	if (ops == NULL)				\
 		return -rte_errno;			\
 							\
 	if (ops->func == NULL)				\
-		return -rte_mtr_error_set(error,		\
+		return -rte_mtr_error_set(error,	\
 			ENOSYS,				\
 			RTE_MTR_ERROR_TYPE_UNSPECIFIED,	\
 			NULL,				\
@@ -58,7 +58,7 @@
 })
 
 #define RTE_MTR_HNDL_FUNC(port_id, func)		\
-({							\
+__extension__ ({					\
 	const struct rte_mtr_ops *ops =			\
 		rte_mtr_ops_get(port_id, error);	\
 	if (ops == NULL)				\
diff --git a/lib/ethdev/rte_tm.c b/lib/ethdev/rte_tm.c
index 2d08141..d594fe0 100644
--- a/lib/ethdev/rte_tm.c
+++ b/lib/ethdev/rte_tm.c
@@ -40,11 +40,11 @@
 	return ops;
 }
 
-#define RTE_TM_FUNC(port_id, func)				\
-({							\
+#define RTE_TM_FUNC(port_id, func)			\
+__extension__ ({					\
 	const struct rte_tm_ops *ops =			\
 		rte_tm_ops_get(port_id, error);		\
-	if (ops == NULL)					\
+	if (ops == NULL)				\
 		return -rte_errno;			\
 							\
 	if (ops->func == NULL)				\
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-11-14 14:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-09 20:13 [PATCH] ethdev: add extension keyword to statement expression macro Tyler Retzlaff
2023-11-10 17:22 ` Ferruh Yigit
2023-11-10 20:32   ` Ferruh Yigit
2023-11-10 20:49   ` Tyler Retzlaff
2023-11-10 23:25     ` Ferruh Yigit
2023-11-11 10:26       ` Thomas Monjalon
2023-11-14 14:49         ` Ferruh Yigit
2023-11-11 10:11   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).