All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Lists linaro-kernel <linaro-kernel@lists.linaro.org>,
	Patch Tracking <patches@linaro.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH Resend] PM: Remove unnecessary !!
Date: Thu, 13 Feb 2014 12:11:33 +0530	[thread overview]
Message-ID: <CAKohpokF5k5epGoSA+JhO0=imK0gjE296bi0Rrh2sNuTOmXB_A@mail.gmail.com> (raw)
In-Reply-To: <dda85a5e41fbb1995fe3bda810a7a8297ccf1dcb.1390370582.git.viresh.kumar@linaro.org>

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!!

  reply	other threads:[~2014-02-13  6:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-22  6:04 [PATCH Resend] PM: Remove unnecessary !! Viresh Kumar
2014-02-13  6:41 ` Viresh Kumar [this message]
2014-03-10 14:01 Viresh Kumar
2014-03-11  1:02 ` Rafael J. Wysocki

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='CAKohpokF5k5epGoSA+JhO0=imK0gjE296bi0Rrh2sNuTOmXB_A@mail.gmail.com' \
    --to=viresh.kumar@linaro.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=rjw@rjwysocki.net \
    /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 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.