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>] [day] [month] [year] [list]
Message-Id: <20250424060339.73119-1-zhangzihuan@kylinos.cn>
Date: Thu, 24 Apr 2025 14:03:39 +0800
From: Zihuan Zhang <zhangzihuan@...inos.cn>
To: rafael@...nel.org,
	pavel@...nel.org,
	len.brown@...el.com
Cc: linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Zihuan Zhang <zhangzihuan@...inos.cn>
Subject: [PATCH v1] PM: Remove unnecessary !!

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,
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ