* [PATCH Resend] PM: Remove unnecessary !!
@ 2014-01-22 6:04 Viresh Kumar
2014-02-13 6:41 ` Viresh Kumar
0 siblings, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2014-01-22 6:04 UTC (permalink / raw)
To: rjw; +Cc: linaro-kernel, patches, linux-kernel, Viresh Kumar
Double ! or !! are normally required to get 0 or 1 out of a expression. A
comparision always returns 0 or 1 and hence there is no need to apply double !
over it again.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
kernel/power/suspend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 62ee437..90b3d93 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -39,7 +39,7 @@ static const struct platform_suspend_ops *suspend_ops;
static bool need_suspend_ops(suspend_state_t state)
{
- return !!(state > PM_SUSPEND_FREEZE);
+ return state > PM_SUSPEND_FREEZE;
}
static DECLARE_WAIT_QUEUE_HEAD(suspend_freeze_wait_head);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH Resend] PM: Remove unnecessary !!
2014-01-22 6:04 [PATCH Resend] PM: Remove unnecessary !! Viresh Kumar
@ 2014-02-13 6:41 ` Viresh Kumar
0 siblings, 0 replies; 4+ messages in thread
From: Viresh Kumar @ 2014-02-13 6:41 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Lists linaro-kernel, Patch Tracking, Linux Kernel Mailing List,
Viresh Kumar
On 22 January 2014 11:34, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> Double ! or !! are normally required to get 0 or 1 out of a expression. A
> comparision always returns 0 or 1 and hence there is no need to apply double !
> over it again.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> kernel/power/suspend.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
> index 62ee437..90b3d93 100644
> --- a/kernel/power/suspend.c
> +++ b/kernel/power/suspend.c
> @@ -39,7 +39,7 @@ static const struct platform_suspend_ops *suspend_ops;
>
> static bool need_suspend_ops(suspend_state_t state)
> {
> - return !!(state > PM_SUSPEND_FREEZE);
> + return state > PM_SUSPEND_FREEZE;
> }
>
> static DECLARE_WAIT_QUEUE_HEAD(suspend_freeze_wait_head);
Ping!!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH Resend] PM: Remove unnecessary !!
2014-03-10 14:01 Viresh Kumar
@ 2014-03-11 1:02 ` Rafael J. Wysocki
0 siblings, 0 replies; 4+ messages in thread
From: Rafael J. Wysocki @ 2014-03-11 1:02 UTC (permalink / raw)
To: Viresh Kumar; +Cc: linaro-kernel, linux-kernel
On Monday, March 10, 2014 07:31:51 PM Viresh Kumar wrote:
> Double ! or !! are normally required to get 0 or 1 out of a expression. A
> comparision always returns 0 or 1 and hence there is no need to apply double !
> over it again.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Queued up for 3.15, thanks!
> ---
> kernel/power/suspend.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
> index 62ee437..90b3d93 100644
> --- a/kernel/power/suspend.c
> +++ b/kernel/power/suspend.c
> @@ -39,7 +39,7 @@ static const struct platform_suspend_ops *suspend_ops;
>
> static bool need_suspend_ops(suspend_state_t state)
> {
> - return !!(state > PM_SUSPEND_FREEZE);
> + return state > PM_SUSPEND_FREEZE;
> }
>
> static DECLARE_WAIT_QUEUE_HEAD(suspend_freeze_wait_head);
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH Resend] PM: Remove unnecessary !!
@ 2014-03-10 14:01 Viresh Kumar
2014-03-11 1:02 ` Rafael J. Wysocki
0 siblings, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2014-03-10 14:01 UTC (permalink / raw)
To: rjw; +Cc: linaro-kernel, linux-kernel, Viresh Kumar
Double ! or !! are normally required to get 0 or 1 out of a expression. A
comparision always returns 0 or 1 and hence there is no need to apply double !
over it again.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
kernel/power/suspend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 62ee437..90b3d93 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -39,7 +39,7 @@ static const struct platform_suspend_ops *suspend_ops;
static bool need_suspend_ops(suspend_state_t state)
{
- return !!(state > PM_SUSPEND_FREEZE);
+ return state > PM_SUSPEND_FREEZE;
}
static DECLARE_WAIT_QUEUE_HEAD(suspend_freeze_wait_head);
--
1.7.12.rc2.18.g61b472e
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-11 0:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-22 6:04 [PATCH Resend] PM: Remove unnecessary !! Viresh Kumar
2014-02-13 6:41 ` Viresh Kumar
2014-03-10 14:01 Viresh Kumar
2014-03-11 1:02 ` Rafael J. Wysocki
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.