[PATCH 1/2] kernel/workqueue: remove redundant initialization for static variables
From: Igor Putko
Date: Tue Jun 23 2026 - 08:01:21 EST
The static variables 'wq_topo_initialized' and 'wq_debug_force_rr_cpu'
are implicitly initialized to false. Remove the explicit initialization
to follow the Linux kernel coding style.
Signed-off-by: Igor Putko <igorpetindev@xxxxxxxxx>
---
kernel/workqueue.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 78068ae8f28a..6287e79dd3b0 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -445,7 +445,7 @@ static unsigned int wq_cache_shard_size = 8;
module_param_named(cache_shard_size, wq_cache_shard_size, uint, 0444);
static bool wq_online; /* can kworkers be created yet? */
-static bool wq_topo_initialized __read_mostly = false;
+static bool wq_topo_initialized __read_mostly;
static struct kmem_cache *pwq_cache;
@@ -490,7 +490,7 @@ static DEFINE_PER_CPU(int, wq_rr_cpu_last);
#ifdef CONFIG_DEBUG_WQ_FORCE_RR_CPU
static bool wq_debug_force_rr_cpu = true;
#else
-static bool wq_debug_force_rr_cpu = false;
+static bool wq_debug_force_rr_cpu;
#endif
module_param_named(debug_force_rr_cpu, wq_debug_force_rr_cpu, bool, 0644);
--
2.34.1