pass: Fix the build warnings
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 12 Jan 2017 08:27:51 +0000 (17:27 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Mon, 16 Jan 2017 11:35:37 +0000 (20:35 +0900)
This patch fixes the build warnings about following issues:
- pass-plugin.c: warning: unused variable 'level' [-Wunused-variable]
- pass-pmqos.c: warning: implicit declaration of function 'get_time_ms' [-Wimplicit-function-declaration]
- pass-pmqos.c: warning: unused variable 'locked_time' [-Wunused-variable]

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass-plugin.c
src/pass/pass-pmqos.c

index 1205463412707b2086a9356ee73fe4a3f38d195f..d8dc8b46e41e5757d2cc05b9a51095b5c1dce8df 100644 (file)
@@ -539,7 +539,6 @@ out:
 int get_pass_table(struct pass_policy *policy, char *pass_conf_path)
 {
        int ret;
-       int level;
 
        policy->state = PASS_UNUSED;
        policy->scenario.state = PASS_UNUSED;
index 87ebbd33f349a6bb7cd1e1a4881332e3e3043659..610251aaefc460979552ab15277d4f02dd03f75d 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "pass.h"
 #include "pass-core.h"
+#include "pass-plugin.h"
 
 #include "core/device-notifier.h"
 #include "core/config-parser.h"
@@ -190,11 +191,10 @@ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data)
        if (locked) {
                _I("Lock   '%s' scenario\n", name);
        } else {
-               int64_t locked_time =
-                       get_time_ms() - scenario->list[index].locked_time;
                scenario->list[index].locked_time = 0;
 
-               _I("UnLock '%s' scenario (%lldms)\n", name, locked_time);
+               _I("UnLock '%s' scenario (%lldms)\n", name,
+                       (get_time_ms() - scenario->list[index].locked_time));
        }
 
        pass_governor_change_level_scope(policy, cpufreq_min_level,