diff mbox series

[27/29] linux-gen: remove static_inline.h header

Message ID 20171023111057.6328-28-dmitry.ereminsolenikov@linaro.org
State Superseded
Headers show
Series restructure headers for ABI-compat/platform-optimized modes | expand

Commit Message

Dmitry Eremin-Solenikov Oct. 23, 2017, 11:10 a.m. UTC
Replace static_inline.h header with unconditional defines of _ODP_INLINE
macro (either to 'static inline' or to empty value) depending on the
compilation place.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
 Makefile.inc                                       |  1 -
 platform/linux-generic/.gitignore                  |  1 -
 platform/linux-generic/Makefile.am                 |  3 --
 .../linux-generic/include-abi/odp/api/abi/atomic.h |  2 +-
 .../include-abi/odp/api/abi/byteorder.h            |  2 +-
 .../linux-generic/include-abi/odp/api/abi/packet.h |  5 ++-
 .../include-abi/odp/api/abi/std_clib.h             |  2 +-
 .../linux-generic/include-abi/odp/api/abi/sync.h   |  2 +-
 .../include-abi/odp/api/abi/ticketlock.h           |  2 +-
 .../include/odp/api/plat/packet_inlines.h          |  3 +-
 .../include/odp/api/plat/static_inline.h.in        | 43 ----------------------
 platform/linux-generic/m4/configure.m4             |  1 -
 12 files changed, 10 insertions(+), 57 deletions(-)
 delete mode 100644 platform/linux-generic/include/odp/api/plat/static_inline.h.in

-- 
2.14.2
diff mbox series

Patch

diff --git a/Makefile.inc b/Makefile.inc
index 91be46bcb017..9d31dff1da9b 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -1,5 +1,4 @@ 
 ODP_INCLUDES = \
-	-I$(top_builddir)/platform/@with_platform@/include \
 	-I$(top_srcdir)/platform/@with_platform@/include \
 	-I$(top_srcdir)/platform/@with_platform@/arch/@ARCH_DIR@ \
 	-I$(top_builddir)/include \
diff --git a/platform/linux-generic/.gitignore b/platform/linux-generic/.gitignore
index 442e82a938bb..fd5ade7e304d 100644
--- a/platform/linux-generic/.gitignore
+++ b/platform/linux-generic/.gitignore
@@ -1,2 +1 @@ 
-include/odp/api/plat/static_inline.h
 libodp-linux.pc
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 3c1551aab7a6..0a49fe67e03b 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -38,9 +38,6 @@  odpapiplatinclude_HEADERS = \
 		  include/odp/api/plat/ticketlock_inlines.h \
 		  include/odp/api/plat/ticketlock_inlines_api.h
 
-nodist_odpapiplatinclude_HEADERS = \
-		  include/odp/api/plat/static_inline.h
-
 if !ODP_ABI_COMPAT
 odpapiabiarchincludedir= $(includedir)/odp/api/abi
 odpapiabiarchinclude_HEADERS = \
diff --git a/platform/linux-generic/include-abi/odp/api/abi/atomic.h b/platform/linux-generic/include-abi/odp/api/abi/atomic.h
index 0b7b254ced23..67127aa4d64e 100644
--- a/platform/linux-generic/include-abi/odp/api/abi/atomic.h
+++ b/platform/linux-generic/include-abi/odp/api/abi/atomic.h
@@ -63,7 +63,7 @@  typedef struct odp_atomic_u32_s odp_atomic_u32_t;
  *  @{
  */
 
-#include <odp/api/plat/static_inline.h>
+#define _ODP_INLINE static inline
 #include <odp/api/plat/atomic_inlines.h>
 
 /**
diff --git a/platform/linux-generic/include-abi/odp/api/abi/byteorder.h b/platform/linux-generic/include-abi/odp/api/abi/byteorder.h
index 0f8fac0b16c8..da07c0eb0b87 100644
--- a/platform/linux-generic/include-abi/odp/api/abi/byteorder.h
+++ b/platform/linux-generic/include-abi/odp/api/abi/byteorder.h
@@ -75,7 +75,7 @@  typedef uint64_t __odp_bitwise	odp_u64be_t;
 typedef uint16_t __odp_bitwise  odp_u16sum_t;
 typedef uint32_t __odp_bitwise  odp_u32sum_t;
 
-#include <odp/api/plat/static_inline.h>
+#define _ODP_INLINE static inline
 #include <odp/api/plat/byteorder_inlines.h>
 
 /**
diff --git a/platform/linux-generic/include-abi/odp/api/abi/packet.h b/platform/linux-generic/include-abi/odp/api/abi/packet.h
index 31d446f8dd9f..1aa7cbd5838e 100644
--- a/platform/linux-generic/include-abi/odp/api/abi/packet.h
+++ b/platform/linux-generic/include-abi/odp/api/abi/packet.h
@@ -32,6 +32,9 @@  typedef ODP_HANDLE_T(odp_packet_t);
 
 typedef uint8_t odp_packet_seg_t;
 
+/* or it will be provided by packet_inlines.h */
+#define _ODP_HAVE_PACKET_SEG_NDX	1
+
 static inline uint8_t _odp_packet_seg_to_ndx(odp_packet_seg_t seg)
 {
 	return (uint8_t)seg;
@@ -53,7 +56,7 @@  typedef enum {
 
 #define ODP_NUM_PACKET_COLORS 3
 
-#include <odp/api/plat/static_inline.h>
+#define _ODP_INLINE static inline
 #include <odp/api/plat/packet_inlines.h>
 #include <odp/api/plat/packet_inlines_api.h>
 
diff --git a/platform/linux-generic/include-abi/odp/api/abi/std_clib.h b/platform/linux-generic/include-abi/odp/api/abi/std_clib.h
index b31034df4705..8ef9e9ad22c8 100644
--- a/platform/linux-generic/include-abi/odp/api/abi/std_clib.h
+++ b/platform/linux-generic/include-abi/odp/api/abi/std_clib.h
@@ -17,7 +17,7 @@ 
 extern "C" {
 #endif
 
-#include <odp/api/plat/static_inline.h>
+#define _ODP_INLINE static inline
 #include <odp/api/plat/std_clib_inlines.h>
 
 #ifdef __cplusplus
diff --git a/platform/linux-generic/include-abi/odp/api/abi/sync.h b/platform/linux-generic/include-abi/odp/api/abi/sync.h
index 74e3fb15fef9..9ecc40f227c7 100644
--- a/platform/linux-generic/include-abi/odp/api/abi/sync.h
+++ b/platform/linux-generic/include-abi/odp/api/abi/sync.h
@@ -21,7 +21,7 @@  extern "C" {
  *  @{
  */
 
-#include <odp/api/plat/static_inline.h>
+#define _ODP_INLINE static inline
 #include <odp/api/plat/sync_inlines.h>
 
 /**
diff --git a/platform/linux-generic/include-abi/odp/api/abi/ticketlock.h b/platform/linux-generic/include-abi/odp/api/abi/ticketlock.h
index 958184be6907..87358d2afe1d 100644
--- a/platform/linux-generic/include-abi/odp/api/abi/ticketlock.h
+++ b/platform/linux-generic/include-abi/odp/api/abi/ticketlock.h
@@ -31,7 +31,7 @@  typedef struct odp_ticketlock_s {
 } odp_ticketlock_t;
 
 /* Include inlined versions of API functions */
-#include <odp/api/plat/static_inline.h>
+#define _ODP_INLINE static inline
 #include <odp/api/plat/ticketlock_inlines.h>
 #include <odp/api/plat/ticketlock_inlines_api.h>
 
diff --git a/platform/linux-generic/include/odp/api/plat/packet_inlines.h b/platform/linux-generic/include/odp/api/plat/packet_inlines.h
index 48475ba823e8..2419404c32f0 100644
--- a/platform/linux-generic/include/odp/api/plat/packet_inlines.h
+++ b/platform/linux-generic/include/odp/api/plat/packet_inlines.h
@@ -25,8 +25,7 @@ 
 /** @internal Inline function offsets */
 extern const _odp_packet_inline_offset_t _odp_packet_inline;
 
-#include <odp/api/plat/static_inline.h>
-#if ODP_ABI_COMPAT == 1
+#ifndef _ODP_HAVE_PACKET_SEG_NDX
 #include <odp/api/plat/strong_types.h>
 /** @internal Inline function @param seg @return */
 static inline uint32_t _odp_packet_seg_to_ndx(odp_packet_seg_t seg)
diff --git a/platform/linux-generic/include/odp/api/plat/static_inline.h.in b/platform/linux-generic/include/odp/api/plat/static_inline.h.in
deleted file mode 100644
index 3cf0043478f3..000000000000
--- a/platform/linux-generic/include/odp/api/plat/static_inline.h.in
+++ /dev/null
@@ -1,43 +0,0 @@ 
-/* Copyright (c) 2016, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier: BSD-3-Clause
- */
-
-/**
- * @file
- *
- * Macro for static inline functions
- */
-
-#ifndef ODP_PLAT_STATIC_INLINE_H_
-#define ODP_PLAT_STATIC_INLINE_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @internal
- * @def ODP_ABI_COMPAT
- * Control ABI compatibility
- */
-
-/**
- * @internal
- * @def _ODP_INLINE
- * Define a function as inlined or not inlined (for ABI compatibility)
- */
-#if @ODP_ABI_COMPAT@
-#define ODP_ABI_COMPAT 1
-#define _ODP_INLINE
-#else
-#define ODP_ABI_COMPAT 0
-#define _ODP_INLINE static inline
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/platform/linux-generic/m4/configure.m4 b/platform/linux-generic/m4/configure.m4
index f4504bf98e45..e605f6281806 100644
--- a/platform/linux-generic/m4/configure.m4
+++ b/platform/linux-generic/m4/configure.m4
@@ -22,7 +22,6 @@  AM_CONDITIONAL([PLATFORM_IS_LINUX_GENERIC],
 	       [test "${with_platform}" = "linux-generic"])
 AC_CONFIG_FILES([platform/linux-generic/Makefile
 		 platform/linux-generic/libodp-linux.pc
-		 platform/linux-generic/include/odp/api/plat/static_inline.h
 		 platform/linux-generic/test/Makefile
 		 platform/linux-generic/test/validation/api/shmem/Makefile
 		 platform/linux-generic/test/validation/api/pktio/Makefile