diff mbox

[PATCHv4] api: fix odp_version_api_str()

Message ID 1423063360-9010-1-git-send-email-maxim.uvarov@linaro.org
State New
Headers show

Commit Message

Maxim Uvarov Feb. 4, 2015, 3:22 p.m. UTC
Remove odp_impl.c and version_types.h, represent
odp_version.c which has implementation for both
api and imp versions.
That change fixes:
https://bugs.linaro.org/show_bug.cgi?id=1194

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 v4: imp version is public api, place to to public header.

 include/odp/api/version.h                          |  2 +-
 platform/linux-generic/Makefile.am                 |  5 ++-
 .../linux-generic/include/odp/plat/version_types.h | 30 -----------------
 platform/linux-generic/include/odp/version.h       | 17 ++--------
 platform/linux-generic/odp_impl.c                  | 35 -------------------
 platform/linux-generic/odp_version.c               | 39 ++++++++++++++++++++++
 6 files changed, 44 insertions(+), 84 deletions(-)
 delete mode 100644 platform/linux-generic/include/odp/plat/version_types.h
 delete mode 100644 platform/linux-generic/odp_impl.c
 create mode 100644 platform/linux-generic/odp_version.c

Comments

Maxim Uvarov Feb. 5, 2015, 2:03 p.m. UTC | #1
That patch needs to go to release because it fixes version output.

Anders said that it will be good to split it on 2, but  I have not idea 
what are the logical pieces
should be there.

Maxim.

On 02/04/2015 06:22 PM, Maxim Uvarov wrote:
> Remove odp_impl.c and version_types.h, represent
> odp_version.c which has implementation for both
> api and imp versions.
> That change fixes:
> https://bugs.linaro.org/show_bug.cgi?id=1194
>
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> ---
>   v4: imp version is public api, place to to public header.
>
>   include/odp/api/version.h                          |  2 +-
>   platform/linux-generic/Makefile.am                 |  5 ++-
>   .../linux-generic/include/odp/plat/version_types.h | 30 -----------------
>   platform/linux-generic/include/odp/version.h       | 17 ++--------
>   platform/linux-generic/odp_impl.c                  | 35 -------------------
>   platform/linux-generic/odp_version.c               | 39 ++++++++++++++++++++++
>   6 files changed, 44 insertions(+), 84 deletions(-)
>   delete mode 100644 platform/linux-generic/include/odp/plat/version_types.h
>   delete mode 100644 platform/linux-generic/odp_impl.c
>   create mode 100644 platform/linux-generic/odp_version.c
>
> diff --git a/include/odp/api/version.h b/include/odp/api/version.h
> index 0889d9c..e684984 100644
> --- a/include/odp/api/version.h
> +++ b/include/odp/api/version.h
> @@ -63,7 +63,7 @@ const char *odp_version_api_str(void);
>    * @sa odp_version_api_str()
>    *
>    * @return null terminated implementation specific version identifier string
> -  */
> + */
>   const char *odp_version_impl_str(void);
>   /**
>    * @}
> diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
> index 81245b1..68603c7 100644
> --- a/platform/linux-generic/Makefile.am
> +++ b/platform/linux-generic/Makefile.am
> @@ -57,8 +57,7 @@ odpplatinclude_HEADERS = \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/plat/queue_types.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/plat/schedule_types.h \
>   		  $(top_srcdir)/platform/linux-generic/include/odp/plat/shared_memory_types.h \
> -		  $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h \
> -		  $(top_srcdir)/platform/linux-generic/include/odp/plat/version_types.h
> +		  $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h
>
>   odpapiincludedir= $(includedir)/odp/api
>   odpapiinclude_HEADERS = \
> @@ -137,7 +136,6 @@ __LIB__libodp_la_SOURCES = \
>   			   odp_crypto.c \
>   			   odp_event.c \
>   			   odp_init.c \
> -			   odp_impl.c \
>   			   odp_linux.c \
>   			   odp_packet.c \
>   			   odp_packet_flags.c \
> @@ -154,4 +152,5 @@ __LIB__libodp_la_SOURCES = \
>   			   odp_ticketlock.c \
>   			   odp_time.c \
>   			   odp_timer.c \
> +			   odp_version.c \
>   			   odp_weak.c
> diff --git a/platform/linux-generic/include/odp/plat/version_types.h b/platform/linux-generic/include/odp/plat/version_types.h
> deleted file mode 100644
> index e3327eb..0000000
> --- a/platform/linux-generic/include/odp/plat/version_types.h
> +++ /dev/null
> @@ -1,30 +0,0 @@
> -/* Copyright (c) 2015, Linaro Limited
> - * All rights reserved.
> - *
> - * SPDX-License-Identifier:     BSD-3-Clause
> - */
> -
> -#ifndef ODP_VERSION_TYPESH_
> -#define ODP_VERSION_TYPESH_
> -
> -#ifdef __cplusplus
> -extern "C" {
> -#endif
> -
> -/** @internal Version string expand */
> -#define ODP_VERSION_STR_EXPAND(x)  #x
> -
> -/** @internal Version to string */
> -#define ODP_VERSION_TO_STR(x)      ODP_VERSION_STR_EXPAND(x)
> -
> -/** @internal API version string */
> -#define ODP_VERSION_API_STR \
> -ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
> -ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
> -ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR)
> -
> -#ifdef __cplusplus
> -}
> -#endif
> -
> -#endif
> diff --git a/platform/linux-generic/include/odp/version.h b/platform/linux-generic/include/odp/version.h
> index f29320a..462ab56 100644
> --- a/platform/linux-generic/include/odp/version.h
> +++ b/platform/linux-generic/include/odp/version.h
> @@ -17,23 +17,10 @@
>   extern "C" {
>   #endif
>
> -#include <odp/plat/version_types.h>
> -
> -/** @ingroup odp_ver_abt_log_dbg
> - *  @{
> - */
> -
> -static inline const char *odp_version_api_str(void)
> -{
> -	return ODP_VERSION_API_STR;
> -}
> -
> -/**
> - * @}
> - */
> -
>   #include <odp/api/version.h>
>
> +#define  ODP_VERSION_IMPL 0
> +
>   #ifdef __cplusplus
>   }
>   #endif
> diff --git a/platform/linux-generic/odp_impl.c b/platform/linux-generic/odp_impl.c
> deleted file mode 100644
> index ca3224d..0000000
> --- a/platform/linux-generic/odp_impl.c
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -/* Copyright (c) 2014, Linaro Limited
> - * All rights reserved.
> - *
> - * SPDX-License-Identifier:     BSD-3-Clause
> - */
> -
> -
> -/**
> - * @file
> - *
> - * ODP Implementation information
> - */
> -
> -#ifndef ODP_IMPL_H_
> -#define ODP_IMPL_H_
> -
> -#ifdef __cplusplus
> -extern "C" {
> -#endif
> -
> -#include <odp/version.h>
> -
> -#define  ODP_VERSION_IMPL 0
> -#define  ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL)
> -
> -const char *odp_version_impl_str(void)
> -{
> -	return ODP_VERSION_IMPL_STR;
> -}
> -
> -#ifdef __cplusplus
> -}
> -#endif
> -
> -#endif
> diff --git a/platform/linux-generic/odp_version.c b/platform/linux-generic/odp_version.c
> new file mode 100644
> index 0000000..032564d
> --- /dev/null
> +++ b/platform/linux-generic/odp_version.c
> @@ -0,0 +1,39 @@
> +/* Copyright (c) 2014, Linaro Limited
> + * All rights reserved.
> + *
> + * SPDX-License-Identifier:     BSD-3-Clause
> + */
> +
> +/**
> + * @file
> + *
> + * ODP API and Implementation information
> + */
> +
> +#include <odp/api/version.h>
> +#include <odp/version.h>
> +
> +/** @internal Version string expand */
> +#define ODP_VERSION_STR_EXPAND(x)  #x
> +
> +/** @internal Version to string */
> +#define ODP_VERSION_TO_STR(x)      ODP_VERSION_STR_EXPAND(x)
> +
> +/** @internal API version string */
> +#define ODP_VERSION_API_STR \
> +ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
> +ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
> +ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR)
> +
> +const char *odp_version_api_str(void)
> +{
> +	return ODP_VERSION_API_STR;
> +}
> +
> +/** @internal Implementation version to string */
> +#define  ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL)
> +
> +const char *odp_version_impl_str(void)
> +{
> +	return ODP_VERSION_IMPL_STR;
> +}
Mike Holmes Feb. 9, 2015, 10:02 a.m. UTC | #2
Anders / Maxim can we fix this at HKG

On 5 February 2015 at 22:03, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> That patch needs to go to release because it fixes version output.
>
> Anders said that it will be good to split it on 2, but  I have not idea
> what are the logical pieces
> should be there.
>
> Maxim.
>
>
> On 02/04/2015 06:22 PM, Maxim Uvarov wrote:
>
>> Remove odp_impl.c and version_types.h, represent
>> odp_version.c which has implementation for both
>> api and imp versions.
>> That change fixes:
>> https://bugs.linaro.org/show_bug.cgi?id=1194
>>
>> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
>> ---
>>   v4: imp version is public api, place to to public header.
>>
>>   include/odp/api/version.h                          |  2 +-
>>   platform/linux-generic/Makefile.am                 |  5 ++-
>>   .../linux-generic/include/odp/plat/version_types.h | 30
>> -----------------
>>   platform/linux-generic/include/odp/version.h       | 17 ++--------
>>   platform/linux-generic/odp_impl.c                  | 35
>> -------------------
>>   platform/linux-generic/odp_version.c               | 39
>> ++++++++++++++++++++++
>>   6 files changed, 44 insertions(+), 84 deletions(-)
>>   delete mode 100644 platform/linux-generic/include/odp/plat/version_
>> types.h
>>   delete mode 100644 platform/linux-generic/odp_impl.c
>>   create mode 100644 platform/linux-generic/odp_version.c
>>
>> diff --git a/include/odp/api/version.h b/include/odp/api/version.h
>> index 0889d9c..e684984 100644
>> --- a/include/odp/api/version.h
>> +++ b/include/odp/api/version.h
>> @@ -63,7 +63,7 @@ const char *odp_version_api_str(void);
>>    * @sa odp_version_api_str()
>>    *
>>    * @return null terminated implementation specific version identifier
>> string
>> -  */
>> + */
>>   const char *odp_version_impl_str(void);
>>   /**
>>    * @}
>> diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/
>> Makefile.am
>> index 81245b1..68603c7 100644
>> --- a/platform/linux-generic/Makefile.am
>> +++ b/platform/linux-generic/Makefile.am
>> @@ -57,8 +57,7 @@ odpplatinclude_HEADERS = \
>>                   $(top_srcdir)/platform/linux-generic/include/odp/plat/queue_types.h
>> \
>>                   $(top_srcdir)/platform/linux-generic/include/odp/plat/schedule_types.h
>> \
>>                   $(top_srcdir)/platform/linux-generic/include/odp/plat/shared_memory_types.h
>> \
>> -                 $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h
>> \
>> -                 $(top_srcdir)/platform/linux-generic/include/odp/plat/
>> version_types.h
>> +                 $(top_srcdir)/platform/linux-generic/include/odp/plat/
>> strong_types.h
>>
>>   odpapiincludedir= $(includedir)/odp/api
>>   odpapiinclude_HEADERS = \
>> @@ -137,7 +136,6 @@ __LIB__libodp_la_SOURCES = \
>>                            odp_crypto.c \
>>                            odp_event.c \
>>                            odp_init.c \
>> -                          odp_impl.c \
>>                            odp_linux.c \
>>                            odp_packet.c \
>>                            odp_packet_flags.c \
>> @@ -154,4 +152,5 @@ __LIB__libodp_la_SOURCES = \
>>                            odp_ticketlock.c \
>>                            odp_time.c \
>>                            odp_timer.c \
>> +                          odp_version.c \
>>                            odp_weak.c
>> diff --git a/platform/linux-generic/include/odp/plat/version_types.h
>> b/platform/linux-generic/include/odp/plat/version_types.h
>> deleted file mode 100644
>> index e3327eb..0000000
>> --- a/platform/linux-generic/include/odp/plat/version_types.h
>> +++ /dev/null
>> @@ -1,30 +0,0 @@
>> -/* Copyright (c) 2015, Linaro Limited
>> - * All rights reserved.
>> - *
>> - * SPDX-License-Identifier:     BSD-3-Clause
>> - */
>> -
>> -#ifndef ODP_VERSION_TYPESH_
>> -#define ODP_VERSION_TYPESH_
>> -
>> -#ifdef __cplusplus
>> -extern "C" {
>> -#endif
>> -
>> -/** @internal Version string expand */
>> -#define ODP_VERSION_STR_EXPAND(x)  #x
>> -
>> -/** @internal Version to string */
>> -#define ODP_VERSION_TO_STR(x)      ODP_VERSION_STR_EXPAND(x)
>> -
>> -/** @internal API version string */
>> -#define ODP_VERSION_API_STR \
>> -ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
>> -ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
>> -ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR)
>> -
>> -#ifdef __cplusplus
>> -}
>> -#endif
>> -
>> -#endif
>> diff --git a/platform/linux-generic/include/odp/version.h
>> b/platform/linux-generic/include/odp/version.h
>> index f29320a..462ab56 100644
>> --- a/platform/linux-generic/include/odp/version.h
>> +++ b/platform/linux-generic/include/odp/version.h
>> @@ -17,23 +17,10 @@
>>   extern "C" {
>>   #endif
>>
>> -#include <odp/plat/version_types.h>
>> -
>> -/** @ingroup odp_ver_abt_log_dbg
>> - *  @{
>> - */
>> -
>> -static inline const char *odp_version_api_str(void)
>> -{
>> -       return ODP_VERSION_API_STR;
>> -}
>> -
>> -/**
>> - * @}
>> - */
>> -
>>   #include <odp/api/version.h>
>>
>> +#define  ODP_VERSION_IMPL 0
>> +
>>   #ifdef __cplusplus
>>   }
>>   #endif
>> diff --git a/platform/linux-generic/odp_impl.c
>> b/platform/linux-generic/odp_impl.c
>> deleted file mode 100644
>> index ca3224d..0000000
>> --- a/platform/linux-generic/odp_impl.c
>> +++ /dev/null
>> @@ -1,35 +0,0 @@
>> -/* Copyright (c) 2014, Linaro Limited
>> - * All rights reserved.
>> - *
>> - * SPDX-License-Identifier:     BSD-3-Clause
>> - */
>> -
>> -
>> -/**
>> - * @file
>> - *
>> - * ODP Implementation information
>> - */
>> -
>> -#ifndef ODP_IMPL_H_
>> -#define ODP_IMPL_H_
>> -
>> -#ifdef __cplusplus
>> -extern "C" {
>> -#endif
>> -
>> -#include <odp/version.h>
>> -
>> -#define  ODP_VERSION_IMPL 0
>> -#define  ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL)
>> -
>> -const char *odp_version_impl_str(void)
>> -{
>> -       return ODP_VERSION_IMPL_STR;
>> -}
>> -
>> -#ifdef __cplusplus
>> -}
>> -#endif
>> -
>> -#endif
>> diff --git a/platform/linux-generic/odp_version.c
>> b/platform/linux-generic/odp_version.c
>> new file mode 100644
>> index 0000000..032564d
>> --- /dev/null
>> +++ b/platform/linux-generic/odp_version.c
>> @@ -0,0 +1,39 @@
>> +/* Copyright (c) 2014, Linaro Limited
>> + * All rights reserved.
>> + *
>> + * SPDX-License-Identifier:     BSD-3-Clause
>> + */
>> +
>> +/**
>> + * @file
>> + *
>> + * ODP API and Implementation information
>> + */
>> +
>> +#include <odp/api/version.h>
>> +#include <odp/version.h>
>> +
>> +/** @internal Version string expand */
>> +#define ODP_VERSION_STR_EXPAND(x)  #x
>> +
>> +/** @internal Version to string */
>> +#define ODP_VERSION_TO_STR(x)      ODP_VERSION_STR_EXPAND(x)
>> +
>> +/** @internal API version string */
>> +#define ODP_VERSION_API_STR \
>> +ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
>> +ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
>> +ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR)
>> +
>> +const char *odp_version_api_str(void)
>> +{
>> +       return ODP_VERSION_API_STR;
>> +}
>> +
>> +/** @internal Implementation version to string */
>> +#define  ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL)
>> +
>> +const char *odp_version_impl_str(void)
>> +{
>> +       return ODP_VERSION_IMPL_STR;
>> +}
>>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov Feb. 11, 2015, 4:19 a.m. UTC | #3
On 02/09/2015 01:02 PM, Mike Holmes wrote:
> Anders / Maxim can we fix this at HKG
>
That is only what we need finalize for current tag.

Maxim.

> On 5 February 2015 at 22:03, Maxim Uvarov <maxim.uvarov@linaro.org 
> <mailto:maxim.uvarov@linaro.org>> wrote:
>
>     That patch needs to go to release because it fixes version output.
>
>     Anders said that it will be good to split it on 2, but  I have not
>     idea what are the logical pieces
>     should be there.
>
>     Maxim.
>
>
>     On 02/04/2015 06:22 PM, Maxim Uvarov wrote:
>
>         Remove odp_impl.c and version_types.h, represent
>         odp_version.c which has implementation for both
>         api and imp versions.
>         That change fixes:
>         https://bugs.linaro.org/show_bug.cgi?id=1194
>
>         Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org
>         <mailto:maxim.uvarov@linaro.org>>
>         ---
>           v4: imp version is public api, place to to public header.
>
>           include/odp/api/version.h |  2 +-
>           platform/linux-generic/Makefile.am  |  5 ++-
>           .../linux-generic/include/odp/plat/version_types.h | 30
>         -----------------
>           platform/linux-generic/include/odp/version.h       | 17
>         ++--------
>           platform/linux-generic/odp_impl.c                  | 35
>         -------------------
>           platform/linux-generic/odp_version.c               | 39
>         ++++++++++++++++++++++
>           6 files changed, 44 insertions(+), 84 deletions(-)
>           delete mode 100644
>         platform/linux-generic/include/odp/plat/version_types.h
>           delete mode 100644 platform/linux-generic/odp_impl.c
>           create mode 100644 platform/linux-generic/odp_version.c
>
>         diff --git a/include/odp/api/version.h b/include/odp/api/version.h
>         index 0889d9c..e684984 100644
>         --- a/include/odp/api/version.h
>         +++ b/include/odp/api/version.h
>         @@ -63,7 +63,7 @@ const char *odp_version_api_str(void);
>            * @sa odp_version_api_str()
>            *
>            * @return null terminated implementation specific version
>         identifier string
>         -  */
>         + */
>           const char *odp_version_impl_str(void);
>           /**
>            * @}
>         diff --git a/platform/linux-generic/Makefile.am
>         b/platform/linux-generic/Makefile.am
>         index 81245b1..68603c7 100644
>         --- a/platform/linux-generic/Makefile.am
>         +++ b/platform/linux-generic/Makefile.am
>         @@ -57,8 +57,7 @@ odpplatinclude_HEADERS = \
>                          
>         $(top_srcdir)/platform/linux-generic/include/odp/plat/queue_types.h
>         \
>                          
>         $(top_srcdir)/platform/linux-generic/include/odp/plat/schedule_types.h
>         \
>                          
>         $(top_srcdir)/platform/linux-generic/include/odp/plat/shared_memory_types.h
>         \
>         -               
>          $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h
>         \
>         -               
>          $(top_srcdir)/platform/linux-generic/include/odp/plat/version_types.h
>         +               
>          $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h
>
>           odpapiincludedir= $(includedir)/odp/api
>           odpapiinclude_HEADERS = \
>         @@ -137,7 +136,6 @@ __LIB__libodp_la_SOURCES = \
>                                    odp_crypto.c \
>                                    odp_event.c \
>                                    odp_init.c \
>         -                          odp_impl.c \
>                                    odp_linux.c \
>                                    odp_packet.c \
>                                    odp_packet_flags.c \
>         @@ -154,4 +152,5 @@ __LIB__libodp_la_SOURCES = \
>                                    odp_ticketlock.c \
>                                    odp_time.c \
>                                    odp_timer.c \
>         +                          odp_version.c \
>                                    odp_weak.c
>         diff --git
>         a/platform/linux-generic/include/odp/plat/version_types.h
>         b/platform/linux-generic/include/odp/plat/version_types.h
>         deleted file mode 100644
>         index e3327eb..0000000
>         --- a/platform/linux-generic/include/odp/plat/version_types.h
>         +++ /dev/null
>         @@ -1,30 +0,0 @@
>         -/* Copyright (c) 2015, Linaro Limited
>         - * All rights reserved.
>         - *
>         - * SPDX-License-Identifier:     BSD-3-Clause
>         - */
>         -
>         -#ifndef ODP_VERSION_TYPESH_
>         -#define ODP_VERSION_TYPESH_
>         -
>         -#ifdef __cplusplus
>         -extern "C" {
>         -#endif
>         -
>         -/** @internal Version string expand */
>         -#define ODP_VERSION_STR_EXPAND(x)  #x
>         -
>         -/** @internal Version to string */
>         -#define ODP_VERSION_TO_STR(x) ODP_VERSION_STR_EXPAND(x)
>         -
>         -/** @internal API version string */
>         -#define ODP_VERSION_API_STR \
>         -ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
>         -ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
>         -ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR)
>         -
>         -#ifdef __cplusplus
>         -}
>         -#endif
>         -
>         -#endif
>         diff --git a/platform/linux-generic/include/odp/version.h
>         b/platform/linux-generic/include/odp/version.h
>         index f29320a..462ab56 100644
>         --- a/platform/linux-generic/include/odp/version.h
>         +++ b/platform/linux-generic/include/odp/version.h
>         @@ -17,23 +17,10 @@
>           extern "C" {
>           #endif
>
>         -#include <odp/plat/version_types.h>
>         -
>         -/** @ingroup odp_ver_abt_log_dbg
>         - *  @{
>         - */
>         -
>         -static inline const char *odp_version_api_str(void)
>         -{
>         -       return ODP_VERSION_API_STR;
>         -}
>         -
>         -/**
>         - * @}
>         - */
>         -
>           #include <odp/api/version.h>
>
>         +#define  ODP_VERSION_IMPL 0
>         +
>           #ifdef __cplusplus
>           }
>           #endif
>         diff --git a/platform/linux-generic/odp_impl.c
>         b/platform/linux-generic/odp_impl.c
>         deleted file mode 100644
>         index ca3224d..0000000
>         --- a/platform/linux-generic/odp_impl.c
>         +++ /dev/null
>         @@ -1,35 +0,0 @@
>         -/* Copyright (c) 2014, Linaro Limited
>         - * All rights reserved.
>         - *
>         - * SPDX-License-Identifier:     BSD-3-Clause
>         - */
>         -
>         -
>         -/**
>         - * @file
>         - *
>         - * ODP Implementation information
>         - */
>         -
>         -#ifndef ODP_IMPL_H_
>         -#define ODP_IMPL_H_
>         -
>         -#ifdef __cplusplus
>         -extern "C" {
>         -#endif
>         -
>         -#include <odp/version.h>
>         -
>         -#define  ODP_VERSION_IMPL 0
>         -#define  ODP_VERSION_IMPL_STR
>         ODP_VERSION_TO_STR(ODP_VERSION_IMPL)
>         -
>         -const char *odp_version_impl_str(void)
>         -{
>         -       return ODP_VERSION_IMPL_STR;
>         -}
>         -
>         -#ifdef __cplusplus
>         -}
>         -#endif
>         -
>         -#endif
>         diff --git a/platform/linux-generic/odp_version.c
>         b/platform/linux-generic/odp_version.c
>         new file mode 100644
>         index 0000000..032564d
>         --- /dev/null
>         +++ b/platform/linux-generic/odp_version.c
>         @@ -0,0 +1,39 @@
>         +/* Copyright (c) 2014, Linaro Limited
>         + * All rights reserved.
>         + *
>         + * SPDX-License-Identifier:     BSD-3-Clause
>         + */
>         +
>         +/**
>         + * @file
>         + *
>         + * ODP API and Implementation information
>         + */
>         +
>         +#include <odp/api/version.h>
>         +#include <odp/version.h>
>         +
>         +/** @internal Version string expand */
>         +#define ODP_VERSION_STR_EXPAND(x)  #x
>         +
>         +/** @internal Version to string */
>         +#define ODP_VERSION_TO_STR(x) ODP_VERSION_STR_EXPAND(x)
>         +
>         +/** @internal API version string */
>         +#define ODP_VERSION_API_STR \
>         +ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
>         +ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
>         +ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR)
>         +
>         +const char *odp_version_api_str(void)
>         +{
>         +       return ODP_VERSION_API_STR;
>         +}
>         +
>         +/** @internal Implementation version to string */
>         +#define  ODP_VERSION_IMPL_STR
>         ODP_VERSION_TO_STR(ODP_VERSION_IMPL)
>         +
>         +const char *odp_version_impl_str(void)
>         +{
>         +       return ODP_VERSION_IMPL_STR;
>         +}
>
>
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> -- 
> *Mike Holmes*
> Linaro  Sr Technical Manager
> LNG - ODP
diff mbox

Patch

diff --git a/include/odp/api/version.h b/include/odp/api/version.h
index 0889d9c..e684984 100644
--- a/include/odp/api/version.h
+++ b/include/odp/api/version.h
@@ -63,7 +63,7 @@  const char *odp_version_api_str(void);
  * @sa odp_version_api_str()
  *
  * @return null terminated implementation specific version identifier string
-  */
+ */
 const char *odp_version_impl_str(void);
 /**
  * @}
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 81245b1..68603c7 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -57,8 +57,7 @@  odpplatinclude_HEADERS = \
 		  $(top_srcdir)/platform/linux-generic/include/odp/plat/queue_types.h \
 		  $(top_srcdir)/platform/linux-generic/include/odp/plat/schedule_types.h \
 		  $(top_srcdir)/platform/linux-generic/include/odp/plat/shared_memory_types.h \
-		  $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h \
-		  $(top_srcdir)/platform/linux-generic/include/odp/plat/version_types.h
+		  $(top_srcdir)/platform/linux-generic/include/odp/plat/strong_types.h
 
 odpapiincludedir= $(includedir)/odp/api
 odpapiinclude_HEADERS = \
@@ -137,7 +136,6 @@  __LIB__libodp_la_SOURCES = \
 			   odp_crypto.c \
 			   odp_event.c \
 			   odp_init.c \
-			   odp_impl.c \
 			   odp_linux.c \
 			   odp_packet.c \
 			   odp_packet_flags.c \
@@ -154,4 +152,5 @@  __LIB__libodp_la_SOURCES = \
 			   odp_ticketlock.c \
 			   odp_time.c \
 			   odp_timer.c \
+			   odp_version.c \
 			   odp_weak.c
diff --git a/platform/linux-generic/include/odp/plat/version_types.h b/platform/linux-generic/include/odp/plat/version_types.h
deleted file mode 100644
index e3327eb..0000000
--- a/platform/linux-generic/include/odp/plat/version_types.h
+++ /dev/null
@@ -1,30 +0,0 @@ 
-/* Copyright (c) 2015, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier:     BSD-3-Clause
- */
-
-#ifndef ODP_VERSION_TYPESH_
-#define ODP_VERSION_TYPESH_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** @internal Version string expand */
-#define ODP_VERSION_STR_EXPAND(x)  #x
-
-/** @internal Version to string */
-#define ODP_VERSION_TO_STR(x)      ODP_VERSION_STR_EXPAND(x)
-
-/** @internal API version string */
-#define ODP_VERSION_API_STR \
-ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
-ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
-ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/platform/linux-generic/include/odp/version.h b/platform/linux-generic/include/odp/version.h
index f29320a..462ab56 100644
--- a/platform/linux-generic/include/odp/version.h
+++ b/platform/linux-generic/include/odp/version.h
@@ -17,23 +17,10 @@ 
 extern "C" {
 #endif
 
-#include <odp/plat/version_types.h>
-
-/** @ingroup odp_ver_abt_log_dbg
- *  @{
- */
-
-static inline const char *odp_version_api_str(void)
-{
-	return ODP_VERSION_API_STR;
-}
-
-/**
- * @}
- */
-
 #include <odp/api/version.h>
 
+#define  ODP_VERSION_IMPL 0
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/platform/linux-generic/odp_impl.c b/platform/linux-generic/odp_impl.c
deleted file mode 100644
index ca3224d..0000000
--- a/platform/linux-generic/odp_impl.c
+++ /dev/null
@@ -1,35 +0,0 @@ 
-/* Copyright (c) 2014, Linaro Limited
- * All rights reserved.
- *
- * SPDX-License-Identifier:     BSD-3-Clause
- */
-
-
-/**
- * @file
- *
- * ODP Implementation information
- */
-
-#ifndef ODP_IMPL_H_
-#define ODP_IMPL_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <odp/version.h>
-
-#define  ODP_VERSION_IMPL 0
-#define  ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL)
-
-const char *odp_version_impl_str(void)
-{
-	return ODP_VERSION_IMPL_STR;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/platform/linux-generic/odp_version.c b/platform/linux-generic/odp_version.c
new file mode 100644
index 0000000..032564d
--- /dev/null
+++ b/platform/linux-generic/odp_version.c
@@ -0,0 +1,39 @@ 
+/* Copyright (c) 2014, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier:     BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * ODP API and Implementation information
+ */
+
+#include <odp/api/version.h>
+#include <odp/version.h>
+
+/** @internal Version string expand */
+#define ODP_VERSION_STR_EXPAND(x)  #x
+
+/** @internal Version to string */
+#define ODP_VERSION_TO_STR(x)      ODP_VERSION_STR_EXPAND(x)
+
+/** @internal API version string */
+#define ODP_VERSION_API_STR \
+ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \
+ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \
+ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR)
+
+const char *odp_version_api_str(void)
+{
+	return ODP_VERSION_API_STR;
+}
+
+/** @internal Implementation version to string */
+#define  ODP_VERSION_IMPL_STR ODP_VERSION_TO_STR(ODP_VERSION_IMPL)
+
+const char *odp_version_impl_str(void)
+{
+	return ODP_VERSION_IMPL_STR;
+}