From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
Cc: pavel@ucw.cz, len.brown@intel.com, linux-kernel@vger.kernel.org,
linux-pm@vger.kernel.org, shuox.liu@intel.com
Subject: Re: [PATCH] PM / Suspend: Fix bug in suspend statistics update
Date: Sat, 19 Nov 2011 14:46:17 +0100 [thread overview]
Message-ID: <201111191446.17426.rjw@sisk.pl> (raw)
In-Reply-To: <20111119092019.27505.77215.stgit@srivatsabhat.in.ibm.com>
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
>
>
next prev parent reply other threads:[~2011-11-19 13:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-19 9:20 Srivatsa S. Bhat
2011-11-19 13:46 ` Rafael J. Wysocki [this message]
2011-11-22 11:42 ` Pavel Machek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201111191446.17426.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=shuox.liu@intel.com \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®