]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PM: sleep: Remove unnecessary !!
authorZihuan Zhang <zhangzihuan@kylinos.cn>
Thu, 24 Apr 2025 06:03:39 +0000 (14:03 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 25 Apr 2025 18:49:20 +0000 (20:49 +0200)
Since initcall_debug is a bool variable, it is not necessary to convert
it to bool with the help of a double logical negation (!!).

Remove the redundant operation.

Signed-off-by: Zihuan Zhang <zhangzihuan@kylinos.cn>
Link: https://patch.msgid.link/20250424060339.73119-1-zhangzihuan@kylinos.cn
[ rjw: Changelog rewrite ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
kernel/power/main.c

index 6254814d481714f769a7ae95bad1310ba1bf1d45..97746f08b762b4e34f661705880bc0b6a9f481e2 100644 (file)
@@ -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,