pass: rescon: Remove unneeded enumeration pass_cpu_state 10/158610/2
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 2 Nov 2017 06:34:42 +0000 (15:34 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 3 Nov 2017 03:20:39 +0000 (12:20 +0900)
This patch removes the unnecessary enumeration pass_cpu_state.
Instead, this patch uses the integer (0 or 1) for cpu_up/down.

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

index e6e8a30242b37bc76e546aed6d403e523deecf78..55dd8b57bcb741b137631ff57776d62a0049a361 100644 (file)
@@ -45,13 +45,10 @@ static void hotplug_set_online(struct pass_policy *policy,
        pass_set_online_min_num(res, min_num);
 
        for (i = 0 ; i < hotplug->num_cpus; i++) {
-               if (i < min_num) {
-                       pass_set_online_state(res, hotplug->sequence[i],
-                                               PASS_CPU_UP);
-               } else {
-                       pass_set_online_state(res, hotplug->sequence[i],
-                                               PASS_CPU_DOWN);
-               }
+               if (i < min_num)
+                       pass_set_online_state(res, hotplug->sequence[i], 1);
+               else
+                       pass_set_online_state(res, hotplug->sequence[i], 0);
        }
 
        /*
index c8a8d70f39ff37627259ce0778e8ae8f4736e141..c3b74fc21490392bd407565b395c458bb5397f22 100644 (file)
@@ -80,14 +80,6 @@ enum pass_gov_state {
        PASS_GOV_STOP,
 };
 
-/*
- * PASS cpu state
- */
-enum pass_cpu_state {
-       PASS_CPU_DOWN = 0,
-       PASS_CPU_UP,
-};
-
 /*
  * struct pass_governor
  */