pass: Fix typo 72/194572/1
authorSuchang Woo <suchang.woo@samsung.com>
Tue, 23 Oct 2018 08:14:07 +0000 (17:14 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 6 Dec 2018 02:37:05 +0000 (11:37 +0900)
Change-Id: I5cce6c6c2a697e78a5871ad8482b1e1c66209293
Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
include/pass/hal/hal.h
src/pass/pass-resmon-internal.h
src/pass/pass-resmon.c
src/pass/pass-resmon.h
src/pass/pass-thermal.c
src/pass/pass.c
src/pass/pass.h
src/pmqos/pmqos-parser.c
src/pmqos/pmqos.c
unittest/pass_gtest.cpp
unittest/pass_haltests.cpp

index b9e2699a2615d512fcd8ff8895b4914473f065c1..3e41493560b16035fb5a6288a598f4e55d6e49cf 100644 (file)
@@ -140,8 +140,8 @@ struct pass_resource_hotplug_ops {
 };
 
 struct pass_resource_tmu_ops {
-       /* Get the current temperature of resoruce. */
-       int (*get_temp)(char *res_thremal_name);
+       /* Get the current temperature of resource. */
+       int (*get_temp)(char *res_thermal_name);
 
        /* Get the policy of thermal management unit. */
        int (*get_policy)(char *res_thermal_name, char *policy);
index d49be99fb1fba04ce902156b0db6d6ad484c183e..0b3563fab6b8cc0664241b0fa56d4ffe23f62d55 100644 (file)
@@ -59,12 +59,12 @@ struct resmon_ops {
        int (*uevent_handler)(struct resmon *monitor, void *result,
                                struct udev_device *dev);
        /**
-        * Intance of uevent subsystem. It will be used for only uevent-based
+        * Instance of uevent subsystem. It will be used for only uevent-based
         * resource monitor.
         */
        const char *uevent_subsystem;
        /**
-        * Intance of uevent device type. It will be used for only uevent-based
+        * Instance of uevent device type. It will be used for only uevent-based
         * resource monitor.
         */
        const char *uevent_devtype;
@@ -123,7 +123,7 @@ struct resmon {
         * File descriptor for udev device. It will be only used for
         * uevent-based resource monitor.
         */
-       guint udev_moniotr_fd;
+       guint udev_monitor_fd;
 };
 
 #endif /* __PASS_RESMON_INTERNAL__ */
index dc323379ff2f7f7bd02bfa1cd3153a1f1962ef12..7b644ce234b1dcb10c4e83ba02910d321c4e9a76 100644 (file)
@@ -338,7 +338,7 @@ int pass_resmon_register_timer(struct pass_resource *res,
        monitor->user_func = user_func;
        monitor->user_data = user_data;
 
-       /* Get instance of struct resmon_ops accoring to resmon_src_type */
+       /* Get instance of struct resmon_ops according to resmon_src_type */
        monitor->ops = resmon_get_ops(src_type);
        if (!monitor->ops) {
                ret = -EINVAL;
@@ -512,7 +512,7 @@ static int resmon_uevent_add(struct resmon *monitor)
        }
 
        /*
-        * At least, either uevent_subsystem or uevet_devtype should be not NULL
+        * At least, either uevent_subsystem or uevent_devtype should be not NULL
         */
        if (!monitor->ops->uevent_subsystem && !monitor->ops->uevent_devtype) {
                _E("failed to add filter due to subsystem/devtype are NULL " \
@@ -579,7 +579,7 @@ static int resmon_uevent_add(struct resmon *monitor)
        /* Bind udev-monitor to enable the udev monitoring */
        ret = udev_monitor_enable_receiving(udev_monitor);
        if (ret < 0) {
-               _E("failed to bind udev monitor for receving the event " \
+               _E("failed to bind udev monitor for receiving the event " \
                                "(res_name:%s, src_type: 0x%x)\n",
                                res->config_data.res_name, monitor->src_type);
                ret = -EAGAIN;
@@ -592,7 +592,7 @@ static int resmon_uevent_add(struct resmon *monitor)
        resmon->uevent_state |= monitor->src_type;
 
        monitor->udev_monitor = udev_monitor;;
-       monitor->udev_moniotr_fd = gfd;
+       monitor->udev_monitor_fd = gfd;
 
        return 0;
 
@@ -630,9 +630,9 @@ static int resmon_uevent_delete(struct resmon *monitor)
        }
 
        udev_monitor_unref(monitor->udev_monitor);
-       g_source_remove(monitor->udev_moniotr_fd);
+       g_source_remove(monitor->udev_monitor_fd);
        monitor->udev_monitor = NULL;
-       monitor->udev_moniotr_fd = -1;
+       monitor->udev_monitor_fd = -1;
 
        /* Delete the uevent-based resmon from uevent_list */
        resmon->uevent_state &= ~(monitor->src_type);
@@ -693,7 +693,7 @@ int pass_resmon_register_uevent(struct pass_resource *res,
        monitor->user_func = user_func;
        monitor->user_data = user_data;
 
-       /* Get instance of struct resmon_ops accoring to resmon_src_type */
+       /* Get instance of struct resmon_ops according to resmon_src_type */
        monitor->ops = resmon_get_ops(src_type);
        if (!monitor->ops) {
                _E("failed to get resmon_ops (res_name: %s, type: 0x%x)\n",
index 05f0b7fea1d4f7547e1a8b1b90287142e36ffaf6..a3b6d8155a67df1069b51accac7d5bf43750a150 100644 (file)
@@ -98,14 +98,14 @@ struct resmon_result_src_cpuhp {
         */
        unsigned int *load;
 
-       unsigned int *nr_running;       /** Unused paramerter will be removed */
-       unsigned int *runnable_load;    /** Unused paramerter will be removed */
+       unsigned int *nr_running;       /** Unused parameter will be removed */
+       unsigned int *runnable_load;    /** Unused parameter will be removed */
 
-       unsigned int num_busy_cpu;      /** Unused paramerter will be removed */
-       unsigned int avg_load;          /** Unused paramerter will be removed */
-       unsigned int avg_runnable_load; /** Unused paramerter will be removed */
-       unsigned int avg_thread_load;   /** Unused paramerter will be removed */
-       /** Unused paramerter will be removed */
+       unsigned int num_busy_cpu;      /** Unused parameter will be removed */
+       unsigned int avg_load;          /** Unused parameter will be removed */
+       unsigned int avg_runnable_load; /** Unused parameter will be removed */
+       unsigned int avg_thread_load;   /** Unused parameter will be removed */
+       /** Unused parameter will be removed */
        unsigned int avg_thread_runnable_load;
 };
 
index 8224deaf34d9bc6fd92fb98248e22fd8459f11e3..f47b4ed0692e02be67ac6a686103b0af3b9a8d78 100644 (file)
@@ -83,7 +83,7 @@ static int thermal_monitor_func(void *result, void *user_data)
 
        /*
         * If temperature is lower than defined temperature in configuration
-        * or if there are no scearnio with 'support=yes',
+        * or if there are no scenario with 'support=yes',
         * just return without notification.
         */
        if (scenario_idx < 0)
index 99bebb87a9a19005716a018d3aa460b6eb8f0db5..304df55762694783602615ae112ac48b67ae049d 100644 (file)
@@ -210,7 +210,7 @@ static int pass_init_resource(struct pass_resource *res)
                return -1;
        }
 
-       /* Check whether PASS is initialzied state or not */
+       /* Check whether PASS is initialized state or not */
        if (res->state) {
                _I("PASS is already active state");
                return -1;
index 5c1bfe77bd9a83e325a7d9110a4682454da78b58..0e4868e82375e11c4a6549e7cbd4ba89097858da 100644 (file)
@@ -225,7 +225,7 @@ struct pass_scenario {
        struct {
                /** Locked state of scenario (either locked or unlocked) */
                enum pass_state locked;
-               /** Requiired locking time of scenario */
+               /** Required locking time of scenario */
                int64_t locked_time;
                /** Required minimum pass_level */
                unsigned int min_level;
@@ -308,7 +308,7 @@ struct pass_pmqos {
        unsigned int curr_level;
        /** Available minimum level according to locked scenarios */
        unsigned int min_level;
-       /** Availabl maximum level according to locked scenarios */
+       /** Available maximum level according to locked scenarios */
        unsigned int max_level;
 };
 
@@ -551,7 +551,7 @@ struct pass_resource {
  ******************************************************/
 
 /**
- * @brief      Represent PASS(Power Aware System Serice).
+ * @brief      Represent PASS(Power Aware System Service).
  */
 struct pass {
        /** State of PASS daemon */
index 77972371287be4da94cf41ea1f6bf047f069d0af..5b32baea735478a120ccc09b803b81d6c29cf714 100644 (file)
@@ -84,7 +84,7 @@ static int pmqos_parse_scenario(struct parse_result *result, void *user_data, un
                                scenarios->list = calloc(num,
                                                sizeof(struct scenario));
                                if (!scenarios->list) {
-                                       _E("failed to allocat memory for scenario");
+                                       _E("failed to allocate memory for scenario");
                                        return -errno;
                                }
 
index 13aae6942b4d937c5bd8f90a52b83614cb457a97..7ffd98b962357cd594a233becf6f785c15dd7b88 100644 (file)
@@ -185,7 +185,7 @@ static gboolean dbus_cb_pmqos_legacy_scenario(SystemPassPmqos *obj,
                }
 
                if (ret < 0) {
-                       _E("cannot set the PMQoS sceanrio: "
+                       _E("cannot set the PMQoS scenario: "
                                        "%s is not supported\n", name_from);
                        ret_out = FALSE;
                        goto out_dbus;
@@ -510,7 +510,7 @@ static int pmqos_init_done(void *data, void *user_data)
                        _I("Support \'%s\' scenario", g_pmqos->list[i].name);
 
        /*
-        * Set maximum timeout for the sceanrio by using the parsed data from
+        * Set maximum timeout for the scenario by using the parsed data from
         * pass-pmqos.conf. But, if there is no setting from pass-pmqos.conf
         * pmqos uses the default timeout value (3000 millisecond).
         */
index 54c83f1b4d3af8a6518e91e7f04fb172329958f3..dd80a17d6ac4b862f397505e7c9e35e79dce0aca 100644 (file)
@@ -232,7 +232,7 @@ TEST_F(PowerMgntTest, RestartsPowerMgntService)
        ASSERT_EQ(ret, 0) << "PassServiceStart Failed";
 
        ret = system("/bin/systemctl stop pass.service");
-       ASSERT_EQ(ret, 0) << "PassServieStop Failed";
+       ASSERT_EQ(ret, 0) << "PassServiceStop Failed";
 
        ret = system("/bin/systemctl start pass.service");
        ASSERT_EQ(ret, 0) << "PassServiceStart Failed";
index 3efc070f62fdeb32aa23848a4a4609acbf67cb6d..3ab48279c5fffcb49493ed61555bf11248482f42 100644 (file)
@@ -40,7 +40,7 @@ static int haltest_is_failed(struct pass_resource *res, int ret)
        /*
         * If -EPERM, function is not supported according to h/w resource type.
         * And if -ENODEV, function is not implemented on hal package.
-        * It means that this funcion is not necessary on two error case
+        * It means that this function is not necessary on two error case
         * when calling the HAL functions.
         */
        if (ret < 0) {
@@ -61,7 +61,7 @@ TEST_F(PowerMgntHalTest, GetResourceConfig_HandlesValidInput)
 
        /* Stop PASS daemon before HAL testing */
        ret = system("/bin/systemctl stop pass.service");
-       ASSERT_EQ(ret, 0) << "PassServieStop Faield";
+       ASSERT_EQ(ret, 0) << "PassServiceStop Failed";
 
        ret = pass_get_resource_config(&g_pass, path);
        ASSERT_EQ(ret, 0) << "GetResourceConfig Failed";
@@ -466,7 +466,7 @@ TEST_F(PowerMgntHalTest, PutResourceConfig_HandlesValidInput)
 
        /* Restart PASS daemon before HAL testing */
        ret = system("/bin/systemctl start pass.service");
-       ASSERT_EQ(ret, 0) << "PassServiceStart Faield";
+       ASSERT_EQ(ret, 0) << "PassServiceStart Failed";
 }
 
 int main(int argc, char *argv[])