[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jbA4_0Fb_n0pR1pCtJBfMgkqBD7ePO-TrxB_E1mv5=Hw@mail.gmail.com>
Date: Fri, 25 Apr 2025 20:51:21 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Zihuan Zhang <zhangzihuan@...inos.cn>
Cc: rafael@...nel.org, pavel@...nel.org, len.brown@...el.com,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] PM: Remove unnecessary !!
On Thu, Apr 24, 2025 at 8:04 AM Zihuan Zhang <zhangzihuan@...inos.cn> 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: Zihuan Zhang <zhangzihuan@...inos.cn>
> ---
> kernel/power/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/power/main.c b/kernel/power/main.c
> index 6254814d4817..97746f08b762 100644
> --- a/kernel/power/main.c
> +++ b/kernel/power/main.c
> @@ -594,7 +594,7 @@ power_attr(pm_print_times);
>
> static inline void pm_print_times_init(void)
> {
> - pm_print_times_enabled = !!initcall_debug;
> + pm_print_times_enabled = initcall_debug;
> }
>
> static ssize_t pm_wakeup_irq_show(struct kobject *kobj,
> --
Applied as 6.16 material with edited changelog, thanks!
Powered by blists - more mailing lists