pass: pmqos: Specify the resource name on log message 97/133197/1
authorChanwoo Choi <cw00.choi@samsung.com>
Fri, 9 Jun 2017 06:50:04 +0000 (15:50 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 9 Jun 2017 06:50:45 +0000 (15:50 +0900)
This patch just adds the correct resource name to pmqos's log message
in order to improve the readability of pmqos's operation.

Example,
- Before: "cannot support 'AppLaunch' scenario (support=0)"
- After : "cannot support 'AppLaunch' scenario for 'cpu0' resource"

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

index 3929dff..e2dcbbb 100644 (file)
@@ -120,15 +120,16 @@ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data)
        locked = is_pmqos_locked(data, name);
        index = find_scenario_index(scenario, name);
        if (index < 0) {
-               _W("Unknown scenario (%s)\n", data);
+               _W("Unknown scenario (%s) for '%s' resource\n",
+                               data, cdata->res_name);
                return -EINVAL;
        }
        scn = &scenario->list[index];
 
        /* Check the state of each scenario whether to support or not */
        if (scn->state != PASS_ON) {
-               _W("cannot support '%s' scenario (support=%d)\n",
-                               name, scn->state);
+               _W("cannot support '%s' scenario for '%s' resource\n",
+                               name, cdata->res_name);
                return 0;
        }
 
@@ -137,8 +138,9 @@ int pass_notifier_pmqos_func(struct pass_policy *policy, void *data)
         * if state is same as existing state
         */
        if (scn->locked == locked) {
-               _E("'%s' scenario is already %s\n",
-                               name, locked ? "Locked" : "Unlocked");
+               _E("'%s' scenario is already %s for '%s' resource\n",
+                               name, locked ? "Locked" : "Unlocked",
+                               cdata->res_name);
                return 0;
        }
        scn->locked = locked;