From: Igor Putko <igorpetindev@gmail.com>
To: tj@kernel.org, jiangshanlai@gmail.com, peterz@infradead.org,
sshegde@linux.ibm.com, vschneid@redhat.com, pauld@redhat.com
Cc: linux-kernel@vger.kernel.org, Igor Putko <igorpetindev@gmail.com>
Subject: [PATCH 1/2] kernel/workqueue: remove redundant initialization for static variables
Date: Tue, 23 Jun 2026 15:01:00 +0300 [thread overview]
Message-ID: <20260623120101.4942-2-igorpetindev@gmail.com> (raw)
In-Reply-To: <20260623120101.4942-1-igorpetindev@gmail.com>
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
next prev parent reply other threads:[~2026-06-23 12:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-23 12:00 [PATCH 0/2] kernel: remove redundant static variable initializations Igor Putko
2026-06-23 12:01 ` Igor Putko [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260623120101.4942-2-igorpetindev@gmail.com \
--to=igorpetindev@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pauld@redhat.com \
--cc=peterz@infradead.org \
--cc=sshegde@linux.ibm.com \
--cc=tj@kernel.org \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox