pass: Adjust indentation to show current resource statues for readability 11/240511/2
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 6 Aug 2020 09:14:27 +0000 (18:14 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 7 Aug 2020 06:38:03 +0000 (15:38 +0900)
Adjust indentation to show current resource statues and remove unneeded
blank line for readability. And remove unneeded comment and blank line.

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

index 4908916..be4e06d 100644 (file)
@@ -44,29 +44,26 @@ static void rescon_print_level(struct pass_resource *res,
        if (!res || !level)
                return;
 
-       /* Add blank line for improving the readability on dlog */
-       _D("");
-
        if (level->limit_min_freq > 0) {
-               _D("MIN Frequency   is %10d of '%s' resource \n",
+               _D("MIN Frequency     is %10d of '%s' resource \n",
                                level->limit_min_freq,
                                res->config_data.res_name);
        }
 
        if (level->limit_max_freq > 0) {
-               _D("MAX Frequency   is %10d of '%s' resource\n",
+               _D("MAX Frequency     is %10d of '%s' resource\n",
                                level->limit_max_freq,
                                res->config_data.res_name);
        }
 
        if (level->limit_min_cpu >= 0) {
-               _D("MIN CPU number  is %10d of '%s' resource\n",
+               _D("MIN CPU number    is %10d of '%s' resource\n",
                                level->limit_min_cpu,
                                res->config_data.res_name);
        }
 
        if (level->limit_max_cpu >= 0) {
-               _D("MAX CPU number  is %10d of '%s' resource\n",
+               _D("MAX CPU number    is %10d of '%s' resource\n",
                                level->limit_max_cpu,
                                res->config_data.res_name);
        }
index 3deae6e..27a3e5f 100644 (file)
@@ -343,19 +343,17 @@ static int pmqos_cancel(const char *name)
                        break;
        }
 
-       /* no cpu */
        if (!elem)
                return 0;
 
-       /* unlock cpu */
        set_pmqos(cpu->name, false);
-       /* delete cpu */
+
        pmqos_head = g_list_remove(pmqos_head, (gconstpointer)cpu);
        free(cpu);
 
        if (strcmp(unlock_timer_owner.name, name))
                goto out;
-       /* undata cpu */
+
        pmqos_unlock_timeout_update();
        pmqos_unlock_timer_start();
 out:
@@ -415,7 +413,6 @@ static int pmqos_request(const char *name, int val)
        int found = 0;
        int ret;
 
-       /* find cpu */
        for (elem = pmqos_head; elem != NULL; elem = elem->next) {
                cpu = elem->data;
                if (!strcmp(cpu->name, name)) {
@@ -425,7 +422,6 @@ static int pmqos_request(const char *name, int val)
                }
        }
 
-       /* add cpu */
        if (!found) {
                cpu = calloc(1, sizeof(struct pmqos_cpu));
                if (!cpu)
@@ -435,14 +431,13 @@ static int pmqos_request(const char *name, int val)
                cpu->timeout = val;
                pmqos_head = g_list_append(pmqos_head, (gpointer)cpu);
        }
-       /* sort cpu */
+
        pmqos_head = g_list_sort(pmqos_head, compare_timeout);
 
        ret = pmqos_unlock_timer_start();
        if (ret < 0)
                goto err;
 
-       /* Set cpu lock */
        set_pmqos(cpu->name, true);
        return 0;
 err: