[20.05,08/15] replace no-inline attributes
diff mbox series

Message ID 20200210162032.1177478-9-thomas@monjalon.net
State Accepted, archived
Delegated to: David Marchand
Headers show
Series
  • clean-up use of __attribute__
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Thomas Monjalon Feb. 10, 2020, 4:20 p.m. UTC
There is a macro __rte_noinline, preventing function to be inlined,
which is now used where appropriate for consistency.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/common/dpaax/compat.h              | 2 +-
 drivers/net/dpaa2/dpaa2_rxtx.c             | 4 ++--
 lib/librte_eal/common/include/rte_common.h | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

Patch
diff mbox series

diff --git a/drivers/common/dpaax/compat.h b/drivers/common/dpaax/compat.h
index 5b11c2d927..90db68ce76 100644
--- a/drivers/common/dpaax/compat.h
+++ b/drivers/common/dpaax/compat.h
@@ -60,7 +60,7 @@ 
 #define __packed	__rte_packed
 #endif
 #ifndef noinline
-#define noinline	__attribute__((noinline))
+#define noinline	__rte_noinline
 #endif
 #define L1_CACHE_BYTES 64
 #define ____cacheline_aligned __rte_aligned(L1_CACHE_BYTES)
diff --git a/drivers/net/dpaa2/dpaa2_rxtx.c b/drivers/net/dpaa2/dpaa2_rxtx.c
index 52d913d9ea..23d48035d5 100644
--- a/drivers/net/dpaa2/dpaa2_rxtx.c
+++ b/drivers/net/dpaa2/dpaa2_rxtx.c
@@ -363,7 +363,7 @@  eth_fd_to_mbuf(const struct qbman_fd *fd,
 	return mbuf;
 }
 
-static int __attribute__ ((noinline)) __attribute__((hot))
+static int __rte_noinline __attribute__((hot))
 eth_mbuf_to_sg_fd(struct rte_mbuf *mbuf,
 		  struct qbman_fd *fd, uint16_t bpid)
 {
@@ -434,7 +434,7 @@  static void
 eth_mbuf_to_fd(struct rte_mbuf *mbuf,
 	       struct qbman_fd *fd, uint16_t bpid) __attribute__((unused));
 
-static void __attribute__ ((noinline)) __attribute__((hot))
+static void __rte_noinline __attribute__((hot))
 eth_mbuf_to_fd(struct rte_mbuf *mbuf,
 	       struct qbman_fd *fd, uint16_t bpid)
 {
diff --git a/lib/librte_eal/common/include/rte_common.h b/lib/librte_eal/common/include/rte_common.h
index 1677a0147a..5145473415 100644
--- a/lib/librte_eal/common/include/rte_common.h
+++ b/lib/librte_eal/common/include/rte_common.h
@@ -155,7 +155,7 @@  static void __attribute__((destructor(RTE_PRIO(prio)), used)) func(void)
 /**
  * Force a function to be noinlined
  */
-#define __rte_noinline  __attribute__((noinline))
+#define __rte_noinline __attribute__((noinline))
 
 /*********** Macros for pointer arithmetic ********/