[PATCH 1/4] percpu: remove redundant assignments to bits
From: Sang-Heon Jeon
Date: Tue Sep 01 2026 - 13:06:35 EST
pcpu_chunk_refresh_hint() and pcpu_find_block_fit() set bits to 0 and
later call pcpu_next_md_free_region() or pcpu_next_fit_region(), which
unconditionally set *bits to 0. Nothing uses it in between, so the
assignments have no effect.
Remove redundant assignments.
No functional change.
Signed-off-by: Sang-Heon Jeon <ekffu200098@xxxxxxxxx>
---
mm/percpu.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index a802d72c116f..5700385fe6a4 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -758,7 +758,6 @@ static void pcpu_chunk_refresh_hint(struct pcpu_chunk *chunk, bool full_scan)
chunk_md->contig_hint = 0;
}
- bits = 0;
pcpu_for_each_md_free_region(chunk, bit_off, bits)
pcpu_block_update(chunk_md, bit_off, bit_off + bits);
}
@@ -1122,7 +1121,6 @@ static int pcpu_find_block_fit(struct pcpu_chunk *chunk, int alloc_bits,
return -1;
bit_off = pcpu_next_hint(chunk_md, alloc_bits);
- bits = 0;
pcpu_for_each_fit_region(chunk, alloc_bits, align, bit_off, bits) {
if (!pop_only || pcpu_is_populated(chunk, bit_off, bits,
&next_off))
--
2.43.0