* [PATCH 0/2] kernel: remove redundant static variable initializations
@ 2026-06-23 12:00 Igor Putko
2026-06-23 12:01 ` [PATCH 1/2] kernel/workqueue: remove redundant initialization for static variables Igor Putko
2026-06-23 12:01 ` [PATCH 2/2] kernel/stop_machine: remove redundant initialization for stop_machine_initialized Igor Putko
0 siblings, 2 replies; 4+ messages in thread
From: Igor Putko @ 2026-06-23 12:00 UTC (permalink / raw)
To: tj, jiangshanlai, peterz, sshegde, vschneid, pauld
Cc: linux-kernel, Igor Putko
This series removes explicit initializations of static bool variables to
false within the kernel/ subsystem. In C, static variables without explicit
initialization are implicitly placed in the .bss section and initialized
to zero/false by default. Removing these explicit initializations follows
the Linux kernel coding style and avoids cluttering the data section.
Igor Putko (2):
kernel/workqueue: remove redundant initialization for static variables
kernel/stop_machine: remove redundant initialization for
stop_machine_initialized
kernel/stop_machine.c | 2 +-
kernel/workqueue.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] kernel/workqueue: remove redundant initialization for static variables
2026-06-23 12:00 [PATCH 0/2] kernel: remove redundant static variable initializations Igor Putko
@ 2026-06-23 12:01 ` Igor Putko
2026-06-23 12:01 ` [PATCH 2/2] kernel/stop_machine: remove redundant initialization for stop_machine_initialized Igor Putko
1 sibling, 0 replies; 4+ messages in thread
From: Igor Putko @ 2026-06-23 12:01 UTC (permalink / raw)
To: tj, jiangshanlai, peterz, sshegde, vschneid, pauld
Cc: linux-kernel, Igor Putko
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@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] kernel/stop_machine: remove redundant initialization for stop_machine_initialized
2026-06-23 12:00 [PATCH 0/2] kernel: remove redundant static variable initializations Igor Putko
2026-06-23 12:01 ` [PATCH 1/2] kernel/workqueue: remove redundant initialization for static variables Igor Putko
@ 2026-06-23 12:01 ` Igor Putko
2026-06-23 12:32 ` Peter Zijlstra
1 sibling, 1 reply; 4+ messages in thread
From: Igor Putko @ 2026-06-23 12:01 UTC (permalink / raw)
To: tj, jiangshanlai, peterz, sshegde, vschneid, pauld
Cc: linux-kernel, Igor Putko
The static variable 'stop_machine_initialized' is implicitly initialized
to false. Remove the explicit initialization to follow the Linux
kernel coding style.
Signed-off-by: Igor Putko <igorpetindev@gmail.com>
---
kernel/stop_machine.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/stop_machine.c b/kernel/stop_machine.c
index 773d8e9ae30c..96dfdaf93c06 100644
--- a/kernel/stop_machine.c
+++ b/kernel/stop_machine.c
@@ -47,7 +47,7 @@ struct cpu_stopper {
};
static DEFINE_PER_CPU(struct cpu_stopper, cpu_stopper);
-static bool stop_machine_initialized = false;
+static bool stop_machine_initialized;
void print_stop_info(const char *log_lvl, struct task_struct *task)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-06-23 12:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-23 12:00 [PATCH 0/2] kernel: remove redundant static variable initializations Igor Putko
2026-06-23 12:01 ` [PATCH 1/2] kernel/workqueue: remove redundant initialization for static variables Igor Putko
2026-06-23 12:01 ` [PATCH 2/2] kernel/stop_machine: remove redundant initialization for stop_machine_initialized Igor Putko
2026-06-23 12:32 ` Peter Zijlstra
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.