lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKohpokF5k5epGoSA+JhO0=imK0gjE296bi0Rrh2sNuTOmXB_A@mail.gmail.com>
Date:	Thu, 13 Feb 2014 12:11:33 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>
Cc:	Lists linaro-kernel <linaro-kernel@...ts.linaro.org>,
	Patch Tracking <patches@...aro.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH Resend] PM: Remove unnecessary !!

On 22 January 2014 11:34, Viresh Kumar <viresh.kumar@...aro.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@...aro.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!!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ