Skip to contentSkip to conversation

pm_qos: Fix reversed min and max

PATCH Applied Colin Cross 3 participants 5 messages Nov 4, 2010 – Nov 11, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pm_qos: Fix reversed min and max

pm_qos_get_value had min and max reversed, causing all pm_qos requests to have no effect.

Change-Id I252c764821eac8d94de57eb482c05bf6afcea15b
Cc "Rafael J. Wysocki" <[email protected]>
Cc mark gross <[email protected]>
Cc James Bottomley <[email protected]>
Cc stable <[email protected]>
---
 kernel/pm_qos_params.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/pm_qos_params.c +2 -2
index 645e541..0da2837 100644
@@ -120,10 +120,10 @@ static inline int pm_qos_get_value(struct pm_qos_object *o)
 
 	switch (o->type) {
 	case PM_QOS_MIN:
-		return plist_last(&o->requests)->prio;
+		return plist_first(&o->requests)->prio;
 
 	case PM_QOS_MAX:
-		return plist_first(&o->requests)->prio;
+		return plist_last(&o->requests)->prio;
 
 	default:
 		/* runtime check for not using enum */
Signature · 1 line
1.7.3.1
Acked-by on v1 1/1
#1 lore raw
Quoted 2 lines · Colin Cross

pm_qos_get_value had min and max reversed, causing all pm_qos requests to have no effect.

sorry.

--mgross

Quoted 30 lines
Change-Id I252c764821eac8d94de57eb482c05bf6afcea15b
Cc "Rafael J. Wysocki" <[email protected]>
Cc mark gross <[email protected]>
Cc James Bottomley <[email protected]>
Cc stable <[email protected]>
---
 kernel/pm_qos_params.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/pm_qos_params.c +2 -2
index 645e541..0da2837 100644
@@ -120,10 +120,10 @@ static inline int pm_qos_get_value(struct pm_qos_object *o)
 
 	switch (o->type) {
 	case PM_QOS_MIN:
-		return plist_last(&o->requests)->prio;
+		return plist_first(&o->requests)->prio;
 
 	case PM_QOS_MAX:
-		return plist_first(&o->requests)->prio;
+		return plist_last(&o->requests)->prio;
 
 	default:
 		/* runtime check for not using enum */
Signature · 1 line
1.7.3.1
Acked-by on v1 1/1
#2 lore raw
In reply to Colin Cross
Quoted 2 lines · Colin Cross

pm_qos_get_value had min and max reversed, causing all pm_qos requests to have no effect.

sorry.

--mgross

Quoted 30 lines
Change-Id I252c764821eac8d94de57eb482c05bf6afcea15b
Cc "Rafael J. Wysocki" <[email protected]>
Cc mark gross <[email protected]>
Cc James Bottomley <[email protected]>
Cc stable <[email protected]>
---
 kernel/pm_qos_params.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/pm_qos_params.c +2 -2
index 645e541..0da2837 100644
@@ -120,10 +120,10 @@ static inline int pm_qos_get_value(struct pm_qos_object *o)
 
 	switch (o->type) {
 	case PM_QOS_MIN:
-		return plist_last(&o->requests)->prio;
+		return plist_first(&o->requests)->prio;
 
 	case PM_QOS_MAX:
-		return plist_first(&o->requests)->prio;
+		return plist_last(&o->requests)->prio;
 
 	default:
 		/* runtime check for not using enum */
Signature · 1 line
1.7.3.1
#3 lore raw
Quoted 6 lines · mark gross
Quoted 2 lines · Colin Cross

pm_qos_get_value had min and max reversed, causing all pm_qos requests to have no effect.

sorry.

Applied to suspend-2.6/linux-next, will push to Linus next week.

Thanks,
Rafael

Quoted 34 lines
Quoted 17 lines
Change-Id I252c764821eac8d94de57eb482c05bf6afcea15b
Cc "Rafael J. Wysocki" <[email protected]>
Cc mark gross <[email protected]>
Cc James Bottomley <[email protected]>
Cc stable <[email protected]>
---
 kernel/pm_qos_params.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/pm_qos_params.c +0 -0
index 645e541..0da2837 100644
@@ -120,10 +120,10 @@ static inline int pm_qos_get_value(struct pm_qos_object *o)
 
 	switch (o->type) {

kernel/pm_qos_params.c static inline int pm_qos_get_value(struct pm_qos_object *o) · line 129

Quoted 10 lines
kernel/pm_qos_params.c +2 -2
 	case PM_QOS_MIN:
-		return plist_last(&o->requests)->prio;
+		return plist_first(&o->requests)->prio;
 
 	case PM_QOS_MAX:
-		return plist_first(&o->requests)->prio;
+		return plist_last(&o->requests)->prio;
 
 	default:
 		/* runtime check for not using enum */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#4 lore raw
In reply to mark gross
Quoted 6 lines · mark gross
Quoted 2 lines · Colin Cross

pm_qos_get_value had min and max reversed, causing all pm_qos requests to have no effect.

sorry.

Applied to suspend-2.6/linux-next, will push to Linus next week.

Thanks,
Rafael

Quoted 34 lines
Quoted 17 lines
Change-Id I252c764821eac8d94de57eb482c05bf6afcea15b
Cc "Rafael J. Wysocki" <[email protected]>
Cc mark gross <[email protected]>
Cc James Bottomley <[email protected]>
Cc stable <[email protected]>
---
 kernel/pm_qos_params.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/pm_qos_params.c +0 -0
index 645e541..0da2837 100644
@@ -120,10 +120,10 @@ static inline int pm_qos_get_value(struct pm_qos_object *o)
 
 	switch (o->type) {

kernel/pm_qos_params.c static inline int pm_qos_get_value(struct pm_qos_object *o) · line 129

Quoted 10 lines
kernel/pm_qos_params.c +2 -2
 	case PM_QOS_MIN:
-		return plist_last(&o->requests)->prio;
+		return plist_first(&o->requests)->prio;
 
 	case PM_QOS_MAX:
-		return plist_first(&o->requests)->prio;
+		return plist_last(&o->requests)->prio;
 
 	default:
 		/* runtime check for not using enum */

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/