From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH Resend] PM: Remove unnecessary !!
Date: Tue, 11 Mar 2014 02:02:07 +0100 [thread overview]
Message-ID: <2023407.4iLFilWYAW@vostro.rjw.lan> (raw)
In-Reply-To: <40f994376d56b4fa090fc2d27403c2188a4af0a4.1394460079.git.viresh.kumar@linaro.org>
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.
next prev parent reply other threads:[~2014-03-11 0:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 14:01 Viresh Kumar
2014-03-11 1:02 ` Rafael J. Wysocki [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-01-22 6:04 Viresh Kumar
2014-02-13 6:41 ` Viresh Kumar
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=2023407.4iLFilWYAW@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viresh.kumar@linaro.org \
/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®