pass: pmqos: Fix bug of locked time 60/113060/2
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 6 Feb 2017 02:00:59 +0000 (11:00 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Tue, 7 Feb 2017 05:10:24 +0000 (14:10 +0900)
This patch fixes the bug of the wrong locked time.
On previous pass-pmqos.c show the current time
instead of the locked time.

- Before
UnLock 'AppLaunch' scenario for 'cpu0' resource (1799653344ms)
- After
UnLock 'AppLaunch' scenario for 'cpu0' resource (3001ms)

Change-Id: Iab24f788436604091058cc2bd085a088042bf8e0
Fixes: 8ddcc2d18db8 ("pass: Fix the build warnings")
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
src/pass/pass-pmqos.c

index 0edfaec275eb726a1c2b21262d6bd163f048dc52..c3dc5846b4f78045aac50da8e0fb58c456bf55ea 100644 (file)
@@ -190,11 +190,11 @@ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data)
                _I("Lock   '%s' scenario for '%s' resource\n",
                        name, cdata->res_name);
        } else {
-               scenario->list[index].locked_time = 0;
-
                _I("UnLock '%s' scenario for '%s' resource (%lldms)\n",
                        name, cdata->res_name,
                        (pass_get_time_ms() - scenario->list[index].locked_time));
+
+               scenario->list[index].locked_time = 0;
        }
 
        pass_governor_change_level_scope(policy, min_level, max_level);