diff mbox

[API-NEXT,PATCHv2] api: byteorder: avoid bitfield order doxygen omissions

Message ID 1468376825-25906-1-git-send-email-bill.fischofer@linaro.org
State Accepted
Commit f62c9aa3f3f48080a61a1e71cd649f1d65539ff5
Headers show

Commit Message

Bill Fischofer July 13, 2016, 2:27 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>

---
 helper/include/odp/helper/tcp.h                               | 4 ++--
 include/odp/api/spec/byteorder.h                              | 3 +++
 platform/linux-generic/include/odp/api/plat/byteorder_types.h | 8 ++++++--
 platform/linux-generic/include/protocols/tcp.h                | 4 ++--
 4 files changed, 13 insertions(+), 6 deletions(-)

-- 
2.7.4

Comments

Bill Fischofer Aug. 4, 2016, 2:30 p.m. UTC | #1
ping - needs review. thx.

On Tue, Jul 12, 2016 at 9:27 PM, Bill Fischofer <bill.fischofer@linaro.org>
wrote:

> 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>

> ---

>  helper/include/odp/helper/tcp.h                               | 4 ++--

>  include/odp/api/spec/byteorder.h                              | 3 +++

>  platform/linux-generic/include/odp/api/plat/byteorder_types.h | 8

> ++++++--

>  platform/linux-generic/include/protocols/tcp.h                | 4 ++--

>  4 files changed, 13 insertions(+), 6 deletions(-)

>

> diff --git a/helper/include/odp/helper/tcp.h b/helper/include/odp/helper/

> tcp.h

> index cabef90..fd234e5 100644

> --- a/helper/include/odp/helper/tcp.h

> +++ b/helper/include/odp/helper/tcp.h

> @@ -34,7 +34,7 @@ typedef struct ODP_PACKED {

>         odp_u32be_t ack_no;   /**< Acknowledgment number */

>         union {

>                 odp_u16be_t doffset_flags;

> -#if defined(ODP_BIG_ENDIAN_BITFIELD)

> +#if ODP_BIG_ENDIAN_BITFIELD

>                 struct {

>                         odp_u16be_t rsvd1:8;

>                         odp_u16be_t flags:8; /**< TCP flags as a byte */

> @@ -51,7 +51,7 @@ typedef struct ODP_PACKED {

>                         odp_u16be_t syn:1;

>                         odp_u16be_t fin:1;

>                 };

> -#elif defined(ODP_LITTLE_ENDIAN_BITFIELD)

> +#elif ODP_LITTLE_ENDIAN_BITFIELD

>                 struct {

>                         odp_u16be_t flags:8;

>                         odp_u16be_t rsvd1:8; /**< TCP flags as a byte */

> diff --git a/include/odp/api/spec/byteorder.h b/include/odp/api/spec/

> byteorder.h

> index 1018997..e16a0d5 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 679d4cf..09235b5 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;

> diff --git a/platform/linux-generic/include/protocols/tcp.h

> b/platform/linux-generic/include/protocols/tcp.h

> index 4e92e4b..114262e 100644

> --- a/platform/linux-generic/include/protocols/tcp.h

> +++ b/platform/linux-generic/include/protocols/tcp.h

> @@ -34,7 +34,7 @@ typedef struct ODP_PACKED {

>         odp_u32be_t ack_no;   /**< Acknowledgment number */

>         union {

>                 odp_u16be_t doffset_flags;

> -#if defined(ODP_BIG_ENDIAN_BITFIELD)

> +#if ODP_BIG_ENDIAN_BITFIELD

>                 struct {

>                         odp_u16be_t rsvd1:8;

>                         odp_u16be_t flags:8; /**< TCP flags as a byte */

> @@ -51,7 +51,7 @@ typedef struct ODP_PACKED {

>                         odp_u16be_t syn:1;

>                         odp_u16be_t fin:1;

>                 };

> -#elif defined(ODP_LITTLE_ENDIAN_BITFIELD)

> +#elif ODP_LITTLE_ENDIAN_BITFIELD

>                 struct {

>                         odp_u16be_t flags:8;

>                         odp_u16be_t rsvd1:8; /**< TCP flags as a byte */

> --

> 2.7.4

>

>
Bill Fischofer Aug. 10, 2016, 12:46 p.m. UTC | #2
On Wed, Aug 10, 2016 at 5:06 AM, Savolainen, Petri (Nokia - FI/Espoo) <
petri.savolainen@nokia-bell-labs.com> wrote:

> I guess v2 is the latest version of this patch.

>


Yes, it is. Thanks.


>

> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>

>

>

> > -----Original Message-----

> > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

> Bill

> > Fischofer

> > Sent: Wednesday, July 13, 2016 5:27 AM

> > To: lng-odp@lists.linaro.org

> > Subject: [lng-odp] [API-NEXT PATCHv2] api: byteorder: avoid bitfield

> order

> > doxygen omissions

> >

> > 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>

> > ---

> >  helper/include/odp/helper/tcp.h                               | 4 ++--

> >  include/odp/api/spec/byteorder.h                              | 3 +++

> >  platform/linux-generic/include/odp/api/plat/byteorder_types.h | 8

> ++++++-

> > -

> >  platform/linux-generic/include/protocols/tcp.h                | 4 ++--

> >  4 files changed, 13 insertions(+), 6 deletions(-)

> >

> > diff --git a/helper/include/odp/helper/tcp.h

> > b/helper/include/odp/helper/tcp.h

> > index cabef90..fd234e5 100644

> > --- a/helper/include/odp/helper/tcp.h

> > +++ b/helper/include/odp/helper/tcp.h

> > @@ -34,7 +34,7 @@ typedef struct ODP_PACKED {

> >       odp_u32be_t ack_no;   /**< Acknowledgment number */

> >       union {

> >               odp_u16be_t doffset_flags;

> > -#if defined(ODP_BIG_ENDIAN_BITFIELD)

> > +#if ODP_BIG_ENDIAN_BITFIELD

> >               struct {

> >                       odp_u16be_t rsvd1:8;

> >                       odp_u16be_t flags:8; /**< TCP flags as a byte */

> > @@ -51,7 +51,7 @@ typedef struct ODP_PACKED {

> >                       odp_u16be_t syn:1;

> >                       odp_u16be_t fin:1;

> >               };

> > -#elif defined(ODP_LITTLE_ENDIAN_BITFIELD)

> > +#elif ODP_LITTLE_ENDIAN_BITFIELD

> >               struct {

> >                       odp_u16be_t flags:8;

> >                       odp_u16be_t rsvd1:8; /**< TCP flags as a byte */

> > diff --git a/include/odp/api/spec/byteorder.h

> > b/include/odp/api/spec/byteorder.h

> > index 1018997..e16a0d5 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 679d4cf..09235b5 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;

> > diff --git a/platform/linux-generic/include/protocols/tcp.h

> > b/platform/linux-generic/include/protocols/tcp.h

> > index 4e92e4b..114262e 100644

> > --- a/platform/linux-generic/include/protocols/tcp.h

> > +++ b/platform/linux-generic/include/protocols/tcp.h

> > @@ -34,7 +34,7 @@ typedef struct ODP_PACKED {

> >       odp_u32be_t ack_no;   /**< Acknowledgment number */

> >       union {

> >               odp_u16be_t doffset_flags;

> > -#if defined(ODP_BIG_ENDIAN_BITFIELD)

> > +#if ODP_BIG_ENDIAN_BITFIELD

> >               struct {

> >                       odp_u16be_t rsvd1:8;

> >                       odp_u16be_t flags:8; /**< TCP flags as a byte */

> > @@ -51,7 +51,7 @@ typedef struct ODP_PACKED {

> >                       odp_u16be_t syn:1;

> >                       odp_u16be_t fin:1;

> >               };

> > -#elif defined(ODP_LITTLE_ENDIAN_BITFIELD)

> > +#elif ODP_LITTLE_ENDIAN_BITFIELD

> >               struct {

> >                       odp_u16be_t flags:8;

> >                       odp_u16be_t rsvd1:8; /**< TCP flags as a byte */

> > --

> > 2.7.4

>

>
Maxim Uvarov Aug. 10, 2016, 1:21 p.m. UTC | #3
Merged,
Maxim.

On 08/10/16 15:46, Bill Fischofer wrote:
> On Wed, Aug 10, 2016 at 5:06 AM, Savolainen, Petri (Nokia - FI/Espoo) <

> petri.savolainen@nokia-bell-labs.com> wrote:

>

>> I guess v2 is the latest version of this patch.

>>

> Yes, it is. Thanks.

>

>

>> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>

>>

>>

>>> -----Original Message-----

>>> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

>> Bill

>>> Fischofer

>>> Sent: Wednesday, July 13, 2016 5:27 AM

>>> To: lng-odp@lists.linaro.org

>>> Subject: [lng-odp] [API-NEXT PATCHv2] api: byteorder: avoid bitfield

>> order

>>> doxygen omissions

>>>

>>> 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>

>>> ---

>>>   helper/include/odp/helper/tcp.h                               | 4 ++--

>>>   include/odp/api/spec/byteorder.h                              | 3 +++

>>>   platform/linux-generic/include/odp/api/plat/byteorder_types.h | 8

>> ++++++-

>>> -

>>>   platform/linux-generic/include/protocols/tcp.h                | 4 ++--

>>>   4 files changed, 13 insertions(+), 6 deletions(-)

>>>

>>> diff --git a/helper/include/odp/helper/tcp.h

>>> b/helper/include/odp/helper/tcp.h

>>> index cabef90..fd234e5 100644

>>> --- a/helper/include/odp/helper/tcp.h

>>> +++ b/helper/include/odp/helper/tcp.h

>>> @@ -34,7 +34,7 @@ typedef struct ODP_PACKED {

>>>        odp_u32be_t ack_no;   /**< Acknowledgment number */

>>>        union {

>>>                odp_u16be_t doffset_flags;

>>> -#if defined(ODP_BIG_ENDIAN_BITFIELD)

>>> +#if ODP_BIG_ENDIAN_BITFIELD

>>>                struct {

>>>                        odp_u16be_t rsvd1:8;

>>>                        odp_u16be_t flags:8; /**< TCP flags as a byte */

>>> @@ -51,7 +51,7 @@ typedef struct ODP_PACKED {

>>>                        odp_u16be_t syn:1;

>>>                        odp_u16be_t fin:1;

>>>                };

>>> -#elif defined(ODP_LITTLE_ENDIAN_BITFIELD)

>>> +#elif ODP_LITTLE_ENDIAN_BITFIELD

>>>                struct {

>>>                        odp_u16be_t flags:8;

>>>                        odp_u16be_t rsvd1:8; /**< TCP flags as a byte */

>>> diff --git a/include/odp/api/spec/byteorder.h

>>> b/include/odp/api/spec/byteorder.h

>>> index 1018997..e16a0d5 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 679d4cf..09235b5 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;

>>> diff --git a/platform/linux-generic/include/protocols/tcp.h

>>> b/platform/linux-generic/include/protocols/tcp.h

>>> index 4e92e4b..114262e 100644

>>> --- a/platform/linux-generic/include/protocols/tcp.h

>>> +++ b/platform/linux-generic/include/protocols/tcp.h

>>> @@ -34,7 +34,7 @@ typedef struct ODP_PACKED {

>>>        odp_u32be_t ack_no;   /**< Acknowledgment number */

>>>        union {

>>>                odp_u16be_t doffset_flags;

>>> -#if defined(ODP_BIG_ENDIAN_BITFIELD)

>>> +#if ODP_BIG_ENDIAN_BITFIELD

>>>                struct {

>>>                        odp_u16be_t rsvd1:8;

>>>                        odp_u16be_t flags:8; /**< TCP flags as a byte */

>>> @@ -51,7 +51,7 @@ typedef struct ODP_PACKED {

>>>                        odp_u16be_t syn:1;

>>>                        odp_u16be_t fin:1;

>>>                };

>>> -#elif defined(ODP_LITTLE_ENDIAN_BITFIELD)

>>> +#elif ODP_LITTLE_ENDIAN_BITFIELD

>>>                struct {

>>>                        odp_u16be_t flags:8;

>>>                        odp_u16be_t rsvd1:8; /**< TCP flags as a byte */

>>> --

>>> 2.7.4

>>
diff mbox

Patch

diff --git a/helper/include/odp/helper/tcp.h b/helper/include/odp/helper/tcp.h
index cabef90..fd234e5 100644
--- a/helper/include/odp/helper/tcp.h
+++ b/helper/include/odp/helper/tcp.h
@@ -34,7 +34,7 @@  typedef struct ODP_PACKED {
 	odp_u32be_t ack_no;   /**< Acknowledgment number */
 	union {
 		odp_u16be_t doffset_flags;
-#if defined(ODP_BIG_ENDIAN_BITFIELD)
+#if ODP_BIG_ENDIAN_BITFIELD
 		struct {
 			odp_u16be_t rsvd1:8;
 			odp_u16be_t flags:8; /**< TCP flags as a byte */
@@ -51,7 +51,7 @@  typedef struct ODP_PACKED {
 			odp_u16be_t syn:1;
 			odp_u16be_t fin:1;
 		};
-#elif defined(ODP_LITTLE_ENDIAN_BITFIELD)
+#elif ODP_LITTLE_ENDIAN_BITFIELD
 		struct {
 			odp_u16be_t flags:8;
 			odp_u16be_t rsvd1:8; /**< TCP flags as a byte */
diff --git a/include/odp/api/spec/byteorder.h b/include/odp/api/spec/byteorder.h
index 1018997..e16a0d5 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 679d4cf..09235b5 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;
diff --git a/platform/linux-generic/include/protocols/tcp.h b/platform/linux-generic/include/protocols/tcp.h
index 4e92e4b..114262e 100644
--- a/platform/linux-generic/include/protocols/tcp.h
+++ b/platform/linux-generic/include/protocols/tcp.h
@@ -34,7 +34,7 @@  typedef struct ODP_PACKED {
 	odp_u32be_t ack_no;   /**< Acknowledgment number */
 	union {
 		odp_u16be_t doffset_flags;
-#if defined(ODP_BIG_ENDIAN_BITFIELD)
+#if ODP_BIG_ENDIAN_BITFIELD
 		struct {
 			odp_u16be_t rsvd1:8;
 			odp_u16be_t flags:8; /**< TCP flags as a byte */
@@ -51,7 +51,7 @@  typedef struct ODP_PACKED {
 			odp_u16be_t syn:1;
 			odp_u16be_t fin:1;
 		};
-#elif defined(ODP_LITTLE_ENDIAN_BITFIELD)
+#elif ODP_LITTLE_ENDIAN_BITFIELD
 		struct {
 			odp_u16be_t flags:8;
 			odp_u16be_t rsvd1:8; /**< TCP flags as a byte */