* [PATCH] PM / Suspend: Fix bug in suspend statistics update
@ 2011-11-19 9:20 Srivatsa S. Bhat
2011-11-19 13:46 ` Rafael J. Wysocki
2011-11-22 11:42 ` Pavel Machek
0 siblings, 2 replies; 3+ messages in thread
From: Srivatsa S. Bhat @ 2011-11-19 9:20 UTC (permalink / raw)
To: rjw; +Cc: pavel, len.brown, linux-kernel, linux-pm, shuox.liu
A pair of missing braces inside the state_store() function causes even
invalid arguments to suspend to be wrongly treated as failed suspend
attempts. Fix this.
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
---
kernel/power/main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 71f49fe..36e0f09 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -290,13 +290,14 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,
if (*s && len == strlen(*s) && !strncmp(buf, *s, len))
break;
}
- if (state < PM_SUSPEND_MAX && *s)
+ if (state < PM_SUSPEND_MAX && *s) {
error = enter_state(state);
if (error) {
suspend_stats.fail++;
dpm_save_failed_errno(error);
} else
suspend_stats.success++;
+ }
#endif
Exit:
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PM / Suspend: Fix bug in suspend statistics update
2011-11-19 9:20 [PATCH] PM / Suspend: Fix bug in suspend statistics update Srivatsa S. Bhat
@ 2011-11-19 13:46 ` Rafael J. Wysocki
2011-11-22 11:42 ` Pavel Machek
1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki @ 2011-11-19 13:46 UTC (permalink / raw)
To: Srivatsa S. Bhat; +Cc: pavel, len.brown, linux-kernel, linux-pm, shuox.liu
On Saturday, November 19, 2011, Srivatsa S. Bhat wrote:
> A pair of missing braces inside the state_store() function causes even
> invalid arguments to suspend to be wrongly treated as failed suspend
> attempts. Fix this.
>
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Good catch! Applied to linux-pm/pm-fixes.
Thanks,
Rafael
> ---
>
> kernel/power/main.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/power/main.c b/kernel/power/main.c
> index 71f49fe..36e0f09 100644
> --- a/kernel/power/main.c
> +++ b/kernel/power/main.c
> @@ -290,13 +290,14 @@ static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr,
> if (*s && len == strlen(*s) && !strncmp(buf, *s, len))
> break;
> }
> - if (state < PM_SUSPEND_MAX && *s)
> + if (state < PM_SUSPEND_MAX && *s) {
> error = enter_state(state);
> if (error) {
> suspend_stats.fail++;
> dpm_save_failed_errno(error);
> } else
> suspend_stats.success++;
> + }
> #endif
>
> Exit:
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] PM / Suspend: Fix bug in suspend statistics update
2011-11-19 9:20 [PATCH] PM / Suspend: Fix bug in suspend statistics update Srivatsa S. Bhat
2011-11-19 13:46 ` Rafael J. Wysocki
@ 2011-11-22 11:42 ` Pavel Machek
1 sibling, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2011-11-22 11:42 UTC (permalink / raw)
To: Srivatsa S. Bhat; +Cc: rjw, len.brown, linux-kernel, linux-pm, shuox.liu
On Sat 2011-11-19 14:50:26, Srivatsa S. Bhat wrote:
> A pair of missing braces inside the state_store() function causes even
> invalid arguments to suspend to be wrongly treated as failed suspend
> attempts. Fix this.
>
> Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
ACK.
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-22 11:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-19 9:20 [PATCH] PM / Suspend: Fix bug in suspend statistics update Srivatsa S. Bhat
2011-11-19 13:46 ` Rafael J. Wysocki
2011-11-22 11:42 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®