Skip to content

Commit

Permalink
PM: QoS: Drop the PM_QOS_SUM QoS type
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Ulf Hansson <[email protected]>
Reviewed-by: Amit Kucheria <[email protected]>
Tested-by: Amit Kucheria <[email protected]>
  • Loading branch information
rafaeljw committed Feb 13, 2020
1 parent 5a7ea52 commit 87ad735
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
1 change: 0 additions & 1 deletion include/linux/pm_qos.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

/*
Expand Down
9 changes: 0 additions & 9 deletions kernel/power/qos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
Expand Down

0 comments on commit 87ad735

Please sign in to comment.