pass: hal: Remove unused pass_get_num_cpus() 78/114678/1
authorChanwoo Choi <cw00.choi@samsung.com>
Tue, 14 Feb 2017 04:17:18 +0000 (13:17 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 14 Feb 2017 06:18:13 +0000 (15:18 +0900)
This patch remvoes the unused pass_get_num_cpus() which get
the maximum number of possible online cpus. After applying
the commit 86cd810d6e1a ("pass: Add new helper function to
handle the h/w resource through hal interface"), the core
uses the 'num_cpus' field in the struct pass_conf_data
instead of the pass_get_num_cpus().

Change-Id: I234bace1c199c03ce1a1f7e4d0b933633b6198d6
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass-hal.c
src/pass/pass-hal.h

index 18629cf26c4ef48fc20767a6e43a0e366ea872c5..851f93b04c9778e247a2197b6c906668f10c717f 100644 (file)
@@ -537,26 +537,9 @@ int pass_get_resource(struct pass *pass)
  * FXIME: Following function is not standard interface.
  * Following functions will be altered by the standard interface on later.
  *
- * - int pass_get_num_cpus(void)
  * - int pass_get_cpu_stats(struct pass_policy *policy)
  * - int64_t pass_get_time_ms(void)
  */
-int pass_get_num_cpus(void)
-{
-       int num_cpus;
-       int ret;
-
-       ret = sys_get_int("/sys/devices/system/cpu/kernel_max", &num_cpus);
-       if (ret < 0)
-               return -EAGAIN;
-
-       /*
-        * Return the number of cpus with plus 1 because of index
-        * of first CPU is 0 (zero). (e.g., Octa cores have the '7' value
-        * of "/sys/devices/system/cpu/kernel_max").
-        */
-       return (num_cpus + 1);
-}
 
 /* Get the load_table of each resource to estimate the system load. */
 int pass_get_cpu_stats(struct pass_policy *policy)
index 77f53268ab8b79751debf33b7f9b93594667894a..09eb879d2175d4d332fdc3d699944b1165a935fb 100644 (file)
@@ -62,7 +62,6 @@ int pass_get_resource(struct pass *pass);
  * FXIME: Following function is not standard interface.
  * These functions will be altered by the standard interface on later.
  */
-int pass_get_num_cpus(void);
 int pass_get_cpu_stats(struct pass_policy *policy);
 int64_t pass_get_time_ms(void);