PM: QoS: Drop the PM_QOS_SUM QoS type
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 11 Feb 2020 22:58:26 +0000 (23:58 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 13 Feb 2020 10:25:48 +0000 (11:25 +0100)
The PM_QOS_SUM QoS type is not used, so drop it along with the
code referring to it in pm_qos_get_value() and the related local
variables in there.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Tested-by: Amit Kucheria <amit.kucheria@linaro.org>
include/linux/pm_qos.h
kernel/power/qos.c

index 4747bdb6bed2112bbef374866453cab0b3259578..48bfb96a936086df140d899b0054ecbf01cfcce6 100644 (file)
@@ -53,7 +53,6 @@ enum pm_qos_type {
        PM_QOS_UNITIALIZED,
        PM_QOS_MAX,             /* return the largest value */
        PM_QOS_MIN,             /* return the smallest value */
-       PM_QOS_SUM              /* return the sum */
 };
 
 /*
index 67dab7f330e48a5d85a9061e1de3d62c21b4b27f..a6be7faa1974342f3f4e2ad46559553773cdc590 100644 (file)
@@ -101,9 +101,6 @@ static const struct file_operations pm_qos_power_fops = {
 /* unlocked internal variant */
 static inline int pm_qos_get_value(struct pm_qos_constraints *c)
 {
-       struct plist_node *node;
-       int total_value = 0;
-
        if (plist_head_empty(&c->list))
                return c->no_constraint_value;
 
@@ -114,12 +111,6 @@ static inline int pm_qos_get_value(struct pm_qos_constraints *c)
        case PM_QOS_MAX:
                return plist_last(&c->list)->prio;
 
-       case PM_QOS_SUM:
-               plist_for_each(node, &c->list)
-                       total_value += node->prio;
-
-               return total_value;
-
        default:
                /* runtime check for not using enum */
                BUG();