From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Kevin Winchester <kjwinchester@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>,
linux-pm@lists.linux-foundation.org,
linux-kernel@vger.kernel.org,
Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH] power: Fix typo in status comparison causing warning
Date: Fri, 29 Oct 2010 09:49:11 +0200 [thread overview]
Message-ID: <201010290949.11833.rjw@sisk.pl> (raw)
In-Reply-To: <1288312192-28909-1-git-send-email-kjwinchester@gmail.com>
On Friday, October 29, 2010, Kevin Winchester wrote:
> GCC version 4.5.1 gives the following warning:
>
> drivers/base/power/runtime.c: In function ‘rpm_check_suspend_allowed’:
> drivers/base/power/runtime.c:146:25: warning: comparison between ‘enum dpm_state’ and ‘enum rpm_status’
>
> which seems to be a typo in that dev->power.runtime_status
> should be compared instead of dev->power.status.
>
> Signed-off-by: Kevin Winchester <kjwinchester@gmail.com>
> ---
> drivers/base/power/runtime.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
> index 126ca49..02c652b 100644
> --- a/drivers/base/power/runtime.c
> +++ b/drivers/base/power/runtime.c
> @@ -143,7 +143,7 @@ static int rpm_check_suspend_allowed(struct device *dev)
>
> /* Pending resume requests take precedence over suspends. */
> else if ((dev->power.deferred_resume
> - && dev->power.status == RPM_SUSPENDING)
> + && dev->power.runtime_status == RPM_SUSPENDING)
> || (dev->power.request_pending
> && dev->power.request == RPM_REQ_RESUME))
> retval = -EAGAIN;
Ouch, this actually is a serious bug.
Thanks a lot for the fix, will push to Linus shortly.
Rafael
next prev parent reply other threads:[~2010-10-29 7:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-29 0:29 Kevin Winchester
2010-10-29 7:49 ` Rafael J. Wysocki [this message]
2010-10-29 14:08 ` Alan Stern
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=201010290949.11833.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=kjwinchester@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pavel@ucw.cz \
--cc=stern@rowland.harvard.edu \
/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®