From: Tyler Retzlaff <roretzla@linux.microsoft.com>
To: dev@dpdk.org
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Cristian Dumitrescu <cristian.dumitrescu@intel.com>,
Ferruh Yigit <ferruh.yigit@amd.com>,
Thomas Monjalon <thomas@monjalon.net>,
Tyler Retzlaff <roretzla@linux.microsoft.com>
Subject: [PATCH] ethdev: add extension keyword to statement expression macro
Date: Thu, 9 Nov 2023 12:13:38 -0800 [thread overview]
Message-ID: <1699560818-7453-1-git-send-email-roretzla@linux.microsoft.com> (raw)
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
next reply other threads:[~2023-11-09 20:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 20:13 Tyler Retzlaff [this message]
2023-11-10 17:22 ` [PATCH] ethdev: add extension keyword to statement expression macro 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
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=1699560818-7453-1-git-send-email-roretzla@linux.microsoft.com \
--to=roretzla@linux.microsoft.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=cristian.dumitrescu@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=thomas@monjalon.net \
/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.