diff mbox

[PATCHv4,2/2] linux-generic: drop odp_ prefix for internal cpuinfo

Message ID 1463424720-32215-3-git-send-email-maxim.uvarov@linaro.org
State Accepted
Commit c60e8d2d311b52c6fadd27ac8289558d1d3faaa1
Headers show

Commit Message

Maxim Uvarov May 16, 2016, 6:52 p.m. UTC
A little bit code clean up to drop odp_ prefix from internal things
and rename huge_pages to default_huge_pages internal struct.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 platform/linux-generic/arch/default/odp_sysinfo_parse.c |  2 +-
 platform/linux-generic/arch/mips64/odp_sysinfo_parse.c  |  2 +-
 platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c |  2 +-
 platform/linux-generic/arch/x86/odp_sysinfo_parse.c     |  2 +-
 platform/linux-generic/include/odp_internal.h           |  8 ++++----
 platform/linux-generic/odp_system_info.c                | 10 +++++-----
 6 files changed, 13 insertions(+), 13 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/arch/default/odp_sysinfo_parse.c b/platform/linux-generic/arch/default/odp_sysinfo_parse.c
index 4dcd6d1..53e2aae 100644
--- a/platform/linux-generic/arch/default/odp_sysinfo_parse.c
+++ b/platform/linux-generic/arch/default/odp_sysinfo_parse.c
@@ -8,7 +8,7 @@ 
 #include <odp_debug_internal.h>
 #include <string.h>
 
-int odp_cpuinfo_parser(FILE *file ODP_UNUSED, odp_system_info_t *sysinfo)
+int cpuinfo_parser(FILE *file ODP_UNUSED, system_info_t *sysinfo)
 {
 	int i;
 
diff --git a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c
index d45b420..407264b 100644
--- a/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c
+++ b/platform/linux-generic/arch/mips64/odp_sysinfo_parse.c
@@ -7,7 +7,7 @@ 
 #include <odp_internal.h>
 #include <string.h>
 
-int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
+int cpuinfo_parser(FILE *file, system_info_t *sysinfo)
 {
 	char str[1024];
 	char *pos;
diff --git a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c
index 95200ee..3b88d55 100644
--- a/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c
+++ b/platform/linux-generic/arch/powerpc/odp_sysinfo_parse.c
@@ -7,7 +7,7 @@ 
 #include <odp_internal.h>
 #include <string.h>
 
-int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
+int cpuinfo_parser(FILE *file, system_info_t *sysinfo)
 {
 	char str[1024];
 	char *pos;
diff --git a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c
index c1e05c0..96127ec 100644
--- a/platform/linux-generic/arch/x86/odp_sysinfo_parse.c
+++ b/platform/linux-generic/arch/x86/odp_sysinfo_parse.c
@@ -7,7 +7,7 @@ 
 #include <odp_internal.h>
 #include <string.h>
 
-int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo)
+int cpuinfo_parser(FILE *file, system_info_t *sysinfo)
 {
 	char str[1024];
 	char *pos;
diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h
index 28a4fc4..19ab40a 100644
--- a/platform/linux-generic/include/odp_internal.h
+++ b/platform/linux-generic/include/odp_internal.h
@@ -30,19 +30,19 @@  extern __thread int __odp_errno;
 
 typedef struct {
 	uint64_t cpu_hz_max[MAX_CPU_NUMBER];
-	uint64_t huge_page_size;
+	uint64_t default_huge_page_size;
 	uint64_t page_size;
 	int      cache_line_size;
 	int      cpu_count;
 	char     cpu_arch_str[128];
 	char     model_str[MAX_CPU_NUMBER][128];
-} odp_system_info_t;
+} system_info_t;
 
 struct odp_global_data_s {
 	pid_t main_pid;
 	odp_log_func_t log_fn;
 	odp_abort_func_t abort_fn;
-	odp_system_info_t system_info;
+	system_info_t system_info;
 	odp_cpumask_t control_cpus;
 	odp_cpumask_t worker_cpus;
 	int num_cpus_installed;
@@ -126,7 +126,7 @@  int _odp_int_name_tbl_term_global(void);
 
 void _odp_flush_caches(void);
 
-int odp_cpuinfo_parser(FILE *file, odp_system_info_t *sysinfo);
+int cpuinfo_parser(FILE *file, system_info_t *sysinfo);
 uint64_t odp_cpu_hz_current(int id);
 
 #ifdef __cplusplus
diff --git a/platform/linux-generic/odp_system_info.c b/platform/linux-generic/odp_system_info.c
index 8e95e05..fca35ce 100644
--- a/platform/linux-generic/odp_system_info.c
+++ b/platform/linux-generic/odp_system_info.c
@@ -98,7 +98,7 @@  static uint64_t default_huge_page_size(void)
 /*
  * Analysis of /sys/devices/system/cpu/ files
  */
-static int systemcpu(odp_system_info_t *sysinfo)
+static int systemcpu(system_info_t *sysinfo)
 {
 	int ret;
 
@@ -124,7 +124,7 @@  static int systemcpu(odp_system_info_t *sysinfo)
 		return -1;
 	}
 
-	sysinfo->huge_page_size = default_huge_page_size();
+	sysinfo->default_huge_page_size = default_huge_page_size();
 
 	return 0;
 }
@@ -137,7 +137,7 @@  int odp_system_info_init(void)
 {
 	FILE  *file;
 
-	memset(&odp_global_data.system_info, 0, sizeof(odp_system_info_t));
+	memset(&odp_global_data.system_info, 0, sizeof(system_info_t));
 
 	odp_global_data.system_info.page_size = ODP_PAGE_SIZE;
 
@@ -147,7 +147,7 @@  int odp_system_info_init(void)
 		return -1;
 	}
 
-	odp_cpuinfo_parser(file, &odp_global_data.system_info);
+	cpuinfo_parser(file, &odp_global_data.system_info);
 
 	fclose(file);
 
@@ -199,7 +199,7 @@  uint64_t odp_cpu_hz_max_id(int id)
 
 uint64_t odp_sys_huge_page_size(void)
 {
-	return odp_global_data.system_info.huge_page_size;
+	return odp_global_data.system_info.default_huge_page_size;
 }
 
 uint64_t odp_sys_page_size(void)