diff mbox

linux-generic: init: fix odp_global_data definition

Message ID 1423127844-28686-1-git-send-email-taras.kondratiuk@linaro.org
State Accepted
Commit ccd671a8f62ddfb9c8ce2fe1c2c5781db3037a84
Headers show

Commit Message

Taras Kondratiuk Feb. 5, 2015, 9:17 a.m. UTC
odp_global_data should be defined once in a C file.

Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
---
 platform/linux-generic/include/odp_internal.h | 6 ++++--
 platform/linux-generic/odp_init.c             | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Mike Holmes Feb. 12, 2015, 12:23 a.m. UTC | #1
Required 3way

On 5 February 2015 at 17:17, Taras Kondratiuk <taras.kondratiuk@linaro.org>
wrote:

> odp_global_data should be defined once in a C file.
>
> Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
>

Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org>


> ---
>  platform/linux-generic/include/odp_internal.h | 6 ++++--
>  platform/linux-generic/odp_init.c             | 1 +
>  2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/platform/linux-generic/include/odp_internal.h
> b/platform/linux-generic/include/odp_internal.h
> index 9a6e29d..1d611e8 100644
> --- a/platform/linux-generic/include/odp_internal.h
> +++ b/platform/linux-generic/include/odp_internal.h
> @@ -20,10 +20,12 @@ extern "C" {
>
>  #include <odp/init.h>
>
> -struct odp_global_data {
> +struct odp_global_data_s {
>         odp_log_func_t log_fn;
>         odp_abort_func_t abort_fn;
> -} odp_global_data;
> +};
> +
> +extern struct odp_global_data_s odp_global_data;
>
>  int odp_system_info_init(void);
>
> diff --git a/platform/linux-generic/odp_init.c
> b/platform/linux-generic/odp_init.c
> index 74c893f..cd8dc46 100644
> --- a/platform/linux-generic/odp_init.c
> +++ b/platform/linux-generic/odp_init.c
> @@ -9,6 +9,7 @@
>  #include <odp/debug.h>
>  #include <odp_debug_internal.h>
>
> +struct odp_global_data_s odp_global_data;
>
>  int odp_init_global(odp_init_t *params  ODP_UNUSED,
>                         odp_platform_init_t *platform_params ODP_UNUSED)
> --
> 1.9.1
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov Feb. 12, 2015, 3:54 a.m. UTC | #2
Merged!

Maxim.

On 02/12/2015 03:23 AM, Mike Holmes wrote:
> Required 3way
>
> On 5 February 2015 at 17:17, Taras Kondratiuk 
> <taras.kondratiuk@linaro.org <mailto:taras.kondratiuk@linaro.org>> wrote:
>
>     odp_global_data should be defined once in a C file.
>
>     Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org
>     <mailto:taras.kondratiuk@linaro.org>>
>
>
> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org 
> <mailto:mike.holmes@linaro.org>>
>
>     ---
>      platform/linux-generic/include/odp_internal.h | 6 ++++--
>      platform/linux-generic/odp_init.c             | 1 +
>      2 files changed, 5 insertions(+), 2 deletions(-)
>
>     diff --git a/platform/linux-generic/include/odp_internal.h
>     b/platform/linux-generic/include/odp_internal.h
>     index 9a6e29d..1d611e8 100644
>     --- a/platform/linux-generic/include/odp_internal.h
>     +++ b/platform/linux-generic/include/odp_internal.h
>     @@ -20,10 +20,12 @@ extern "C" {
>
>      #include <odp/init.h>
>
>     -struct odp_global_data {
>     +struct odp_global_data_s {
>             odp_log_func_t log_fn;
>             odp_abort_func_t abort_fn;
>     -} odp_global_data;
>     +};
>     +
>     +extern struct odp_global_data_s odp_global_data;
>
>      int odp_system_info_init(void);
>
>     diff --git a/platform/linux-generic/odp_init.c
>     b/platform/linux-generic/odp_init.c
>     index 74c893f..cd8dc46 100644
>     --- a/platform/linux-generic/odp_init.c
>     +++ b/platform/linux-generic/odp_init.c
>     @@ -9,6 +9,7 @@
>      #include <odp/debug.h>
>      #include <odp_debug_internal.h>
>
>     +struct odp_global_data_s odp_global_data;
>
>      int odp_init_global(odp_init_t *params  ODP_UNUSED,
>                             odp_platform_init_t *platform_params
>     ODP_UNUSED)
>     --
>     1.9.1
>
>
>     _______________________________________________
>     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
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h
index 9a6e29d..1d611e8 100644
--- a/platform/linux-generic/include/odp_internal.h
+++ b/platform/linux-generic/include/odp_internal.h
@@ -20,10 +20,12 @@  extern "C" {
 
 #include <odp/init.h>
 
-struct odp_global_data {
+struct odp_global_data_s {
 	odp_log_func_t log_fn;
 	odp_abort_func_t abort_fn;
-} odp_global_data;
+};
+
+extern struct odp_global_data_s odp_global_data;
 
 int odp_system_info_init(void);
 
diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c
index 74c893f..cd8dc46 100644
--- a/platform/linux-generic/odp_init.c
+++ b/platform/linux-generic/odp_init.c
@@ -9,6 +9,7 @@ 
 #include <odp/debug.h>
 #include <odp_debug_internal.h>
 
+struct odp_global_data_s odp_global_data;
 
 int odp_init_global(odp_init_t *params  ODP_UNUSED,
 			odp_platform_init_t *platform_params ODP_UNUSED)