pass-hal: tm2: Remove tm2-specific define statements for cpu 88/137888/2 accepted/tizen/4.0/unified/20170816.010833 accepted/tizen/4.0/unified/20170816.014458 accepted/tizen/unified/20170804.025540 submit/tizen/20170802.103729 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170814.115522 submit/tizen_4.0_unified/20170814.115522
authorWook Song <wook16.song@samsung.com>
Mon, 10 Jul 2017 07:24:43 +0000 (16:24 +0900)
committerWook Song <wook16.song@samsung.com>
Mon, 10 Jul 2017 07:48:57 +0000 (16:48 +0900)
This patch removes the tm2-specific define statements such as
TM2_CPU_MIN_NUM and TM2_CPU_MAX_NUM, which were used to check CPU
indexes out of range. The reasons why we need to remove this
board-specific code are that 1) such CPU indexes out of range would
never occur and 2) it is required to standardize the HAL function
implementation.

Change-Id: I10c96c36975bbe5b33e6102742fac917682616f1
Signed-off-by: Wook Song <wook16.song@samsung.com>
src/cpu/cpu.c

index 9cac0de..18f407e 100644 (file)
@@ -54,9 +54,6 @@
 #define TMU_TEMP_PATH_SUFFIX                   "/temp"
 #define TMU_POLICY_PATH_SUFFIX                 "/policy"
 
-#define TM2_CPU_MIN_NUM                                0
-#define TM2_CPU_MAX_NUM                                7
-
 static int tm2_dvfs_get_curr_governor(char *res_name, char *governor)
 {
        char path[PATH_MAX];
@@ -262,8 +259,6 @@ static int tm2_hotplug_get_online_state(char *res_name, int cpu)
 
        if ((!res_name))
                return -EINVAL;
-       if ((cpu < TM2_CPU_MIN_NUM) || (cpu > TM2_CPU_MAX_NUM))
-               return -EINVAL;
 
        snprintf(path, PATH_MAX, "%s%d%s",
                CPU_ONLINE_PATH_PREFIX,
@@ -284,8 +279,6 @@ static int tm2_hotplug_set_online_state(char *res_name, int cpu, int on)
 
        if ((!res_name))
                return -EINVAL;
-       if ((cpu < TM2_CPU_MIN_NUM) || (cpu > TM2_CPU_MAX_NUM))
-               return -EINVAL;
        if ((on != CPU_ONLINE_STATE_ON) && (on != CPU_ONLINE_STATE_OFF))
                return -EINVAL;