From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Dennis Zhou <dennis@kernel.org>, Tejun Heo <tj@kernel.org>,
Christoph Lameter <cl@gentwo.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 2/4] percpu: remove unnecessary initialization in pcpu_build_alloc_info()
Date: Wed, 2 Sep 2026 01:53:02 +0900 [thread overview]
Message-ID: <20260901165307.1026248-3-ekffu200098@gmail.com> (raw)
In-Reply-To: <20260901165307.1026248-1-ekffu200098@gmail.com>
pcpu_build_alloc_info() initializes nr_groups to 1 and unconditionally
sets it to the number of groups. Nothing uses it in between, so the
initialization has no effect.
Remove unnecessary initialization.
No functional change.
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
mm/percpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index 5700385fe6a4..f222b43cc90a 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -2817,7 +2817,7 @@ static struct pcpu_alloc_info * __init __flatten pcpu_build_alloc_info(
static int group_cnt[NR_CPUS] __initdata;
static struct cpumask mask __initdata;
const size_t static_size = __per_cpu_end - __per_cpu_start;
- int nr_groups = 1, nr_units = 0;
+ int nr_groups, nr_units = 0;
size_t size_sum, min_unit_size, alloc_size;
int upa, max_upa, best_upa; /* units_per_alloc */
int last_allocs, group, unit;
--
2.43.0
next prev parent reply other threads:[~2026-09-01 16:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-01 16:53 [PATCH 0/4] percpu: remove code with no effect Sang-Heon Jeon
2026-09-01 16:53 ` [PATCH 1/4] percpu: remove redundant assignments to bits Sang-Heon Jeon
2026-09-01 16:53 ` Sang-Heon Jeon [this message]
2026-09-01 16:53 ` [PATCH 3/4] percpu: remove unnecessary cpumask_clear() in pcpu_build_alloc_info() Sang-Heon Jeon
2026-09-01 16:53 ` [PATCH 4/4] percpu: remove unnecessary return in pcpu_populate_pte() Sang-Heon Jeon
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=20260901165307.1026248-3-ekffu200098@gmail.com \
--to=ekffu200098@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=dennis@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tj@kernel.org \
/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
all inboxes | Powered by JetHome®