diff mbox

[API-NEXT,2/4] linux-generic: systemcpu(): use input parameter instead of global data

Message ID 1454067047-381-3-git-send-email-hongbo.zhang@linaro.org
State Superseded
Headers show

Commit Message

Hongbo Zhang Jan. 29, 2016, 11:30 a.m. UTC
From: Hongbo Zhang <hongbo.zhang@linaro.org>

In the systemcpu() function, odp_global_data.system_info.huge_page_size
should be sysinfo->huge_page_size instead, because when systemcpu() is
called, the &odp_global_data.system_info is passed as parameter, we should
operate the parameter instead of the global data directly, what's more,
in function systemcpu(), sysinfo->cpu_count and sysinfo->cache_line_size
are used, we should follow same pattern for sysinfo->huge_page_size.

Signed-off-by: Hongbo Zhang <hongbo.zhang@linaro.org>
---
 platform/linux-generic/odp_system_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c
index bedbbc8..2d202a0 100644
--- a/platform/linux-generic/odp_system_info.c
+++ b/platform/linux-generic/odp_system_info.c
@@ -137,7 +137,7 @@  static int systemcpu(odp_system_info_t *sysinfo)
 		return -1;
 	}
 
-	odp_global_data.system_info.huge_page_size = huge_page_size();
+	sysinfo->huge_page_size = huge_page_size();
 
 	return 0;
 }