* [PATCH] power: Fix typo in status comparison causing warning
@ 2010-10-29 0:29 Kevin Winchester
0 siblings, 0 replies; 6+ messages in thread
From: Kevin Winchester @ 2010-10-29 0:29 UTC (permalink / raw)
To: Pavel Machek, Rafael J. Wysocki; +Cc: Kevin Winchester, linux-pm, linux-kernel
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;
--
1.7.3.2
_______________________________________________
linux-pm mailing list
linux-pm@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] power: Fix typo in status comparison causing warning
2010-10-29 7:49 ` Rafael J. Wysocki
@ 2010-10-29 14:08 ` Alan Stern
2010-10-29 14:08 ` Alan Stern
1 sibling, 0 replies; 6+ messages in thread
From: Alan Stern @ 2010-10-29 14:08 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Kevin Winchester, Pavel Machek, linux-pm, linux-kernel
On Fri, 29 Oct 2010, Rafael J. Wysocki wrote:
> 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.
Yes indeed. I should have caught it while reviewing the patch. A
quick check shows there are no other similar typos.
> Thanks a lot for the fix, will push to Linus shortly.
>
> Rafael
Alan Stern
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: Fix typo in status comparison causing warning
2010-10-29 7:49 ` Rafael J. Wysocki
2010-10-29 14:08 ` Alan Stern
@ 2010-10-29 14:08 ` Alan Stern
1 sibling, 0 replies; 6+ messages in thread
From: Alan Stern @ 2010-10-29 14:08 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Kevin Winchester, linux-pm, linux-kernel
On Fri, 29 Oct 2010, Rafael J. Wysocki wrote:
> 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.
Yes indeed. I should have caught it while reviewing the patch. A
quick check shows there are no other similar typos.
> Thanks a lot for the fix, will push to Linus shortly.
>
> Rafael
Alan Stern
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: Fix typo in status comparison causing warning
2010-10-29 0:29 Kevin Winchester
2010-10-29 7:49 ` Rafael J. Wysocki
@ 2010-10-29 7:49 ` Rafael J. Wysocki
2010-10-29 14:08 ` Alan Stern
2010-10-29 14:08 ` Alan Stern
1 sibling, 2 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2010-10-29 7:49 UTC (permalink / raw)
To: Kevin Winchester; +Cc: Pavel Machek, linux-pm, linux-kernel, Alan Stern
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] power: Fix typo in status comparison causing warning
2010-10-29 0:29 Kevin Winchester
@ 2010-10-29 7:49 ` Rafael J. Wysocki
2010-10-29 7:49 ` Rafael J. Wysocki
1 sibling, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2010-10-29 7:49 UTC (permalink / raw)
To: Kevin Winchester; +Cc: linux-pm, linux-kernel
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
_______________________________________________
linux-pm mailing list
linux-pm@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/linux-pm
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] power: Fix typo in status comparison causing warning
@ 2010-10-29 0:29 Kevin Winchester
2010-10-29 7:49 ` Rafael J. Wysocki
2010-10-29 7:49 ` Rafael J. Wysocki
0 siblings, 2 replies; 6+ messages in thread
From: Kevin Winchester @ 2010-10-29 0:29 UTC (permalink / raw)
To: Pavel Machek, Rafael J. Wysocki, Pavel Machek, Rafael J. Wysocki
Cc: Kevin Winchester, linux-pm, linux-kernel
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;
--
1.7.3.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-10-29 14:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-29 0:29 [PATCH] power: Fix typo in status comparison causing warning Kevin Winchester
-- strict thread matches above, loose matches on Subject: below --
2010-10-29 0:29 Kevin Winchester
2010-10-29 7:49 ` Rafael J. Wysocki
2010-10-29 7:49 ` Rafael J. Wysocki
2010-10-29 14:08 ` Alan Stern
2010-10-29 14:08 ` Alan Stern
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.