diff mbox

[MONARCH_LTS] api: byteorder: avoid bitfield order doxygen omissions

Message ID 20170712014357.12352-1-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer July 12, 2017, 1:43 a.m. UTC
Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2402 by assigning
explicit values to ODP_LITTLE_ENDIAN_BITFIELD and ODP_BIT_ENDIAN_BITFIELD
to avoid Doxygen warnings. This makes these consistent with the usage for
ODP_BIG_ENDIAN and ODP_LITTLE_ENDIAN. Also define the summary variable
ODP_BITFIELD_ORDER which can be used similar to ODP_BYTE_ORDER for an
explicit test of bitfield endianness.

Note that this requires tests of these fields to change from #ifdef to #if.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>

---
 include/odp/api/spec/byteorder.h                              | 3 +++
 platform/linux-generic/include/odp/api/plat/byteorder_types.h | 8 ++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

-- 
2.11.0
diff mbox

Patch

diff --git a/include/odp/api/spec/byteorder.h b/include/odp/api/spec/byteorder.h
index 10189971..e16a0d5a 100644
--- a/include/odp/api/spec/byteorder.h
+++ b/include/odp/api/spec/byteorder.h
@@ -39,6 +39,9 @@  extern "C" {
  *
  * @def ODP_BYTE_ORDER
  * Selected byte order
+ *
+ * @def ODP_BITFIELD_ORDER
+ * Selected bitfield order
  */
 
 /**
diff --git a/platform/linux-generic/include/odp/api/plat/byteorder_types.h b/platform/linux-generic/include/odp/api/plat/byteorder_types.h
index 679d4cf9..09235b53 100644
--- a/platform/linux-generic/include/odp/api/plat/byteorder_types.h
+++ b/platform/linux-generic/include/odp/api/plat/byteorder_types.h
@@ -52,12 +52,16 @@  extern "C" {
 	#define ODP_LITTLE_ENDIAN           1
 	#define ODP_BIG_ENDIAN              0
 	#define ODP_BYTE_ORDER              ODP_LITTLE_ENDIAN
-	#define ODP_LITTLE_ENDIAN_BITFIELD
+	#define ODP_LITTLE_ENDIAN_BITFIELD  1
+	#define ODP_BIG_ENDIAN_BITFIELD     0
+	#define ODP_BITFIELD_ORDER          ODP_LITTLE_ENDIAN_BITFIELD
 #else
 	#define ODP_LITTLE_ENDIAN           0
 	#define ODP_BIG_ENDIAN              1
 	#define	ODP_BYTE_ORDER              ODP_BIG_ENDIAN
-	#define ODP_BIG_ENDIAN_BITFIELD
+	#define ODP_LITTLE_ENDIAN_BITFIELD  0
+	#define ODP_BIG_ENDIAN_BITFIELD     1
+	#define ODP_BITFIELD_ORDER          ODP_BIG_ENDIAN_BITFIELD
 #endif
 
 typedef uint16_t __odp_bitwise	odp_u16le_t;