From: Yury Norov <yury.norov@gmail.com>
To: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Cc: Yury Norov <yury.norov@gmail.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>,
Charlie Jenkins <charlie@rivosinc.com>,
Alexandre Ghiti <alexghiti@rivosinc.com>,
Samuel Holland <samuel.holland@sifive.com>,
Anup Patel <anup@brainfault.org>
Subject: [PATCH 4/4] cpumask: drop cpumask_assign_cpu()
Date: Wed, 12 Mar 2025 22:19:52 -0400 [thread overview]
Message-ID: <20250313021953.86035-5-yury.norov@gmail.com> (raw)
In-Reply-To: <20250313021953.86035-1-yury.norov@gmail.com>
Commit decde1fa209323c7 ("cpumask: Add assign cpu") was merged bypassing
cpumasks reviewers. It adds atomic and non-atomic cpumask_assign_cpu()
helpers.
In the same merge window, commit 5c563ee90a22d3 ("cpumask: introduce
assign_cpu() macro") added the same functionality. So now we have it
duplicated.
__cpumask_assign_cpu() has never been used since introducing, and because
this series reworks the only user of cpumask_assign_cpu(), both functions
become a dead code.
Signed-off-by: Yury Norov <yury.norov@gmail.com>
---
include/linux/cpumask.h | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index f8caa025c6bb..ddeefb2744b1 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -558,22 +558,6 @@ static __always_inline void __cpumask_clear_cpu(int cpu, struct cpumask *dstp)
__clear_bit(cpumask_check(cpu), cpumask_bits(dstp));
}
-/**
- * cpumask_assign_cpu - assign a cpu in a cpumask
- * @cpu: cpu number (< nr_cpu_ids)
- * @dstp: the cpumask pointer
- * @bool: the value to assign
- */
-static __always_inline void cpumask_assign_cpu(int cpu, struct cpumask *dstp, bool value)
-{
- assign_bit(cpumask_check(cpu), cpumask_bits(dstp), value);
-}
-
-static __always_inline void __cpumask_assign_cpu(int cpu, struct cpumask *dstp, bool value)
-{
- __assign_bit(cpumask_check(cpu), cpumask_bits(dstp), value);
-}
-
/**
* cpumask_test_cpu - test for a cpu in a cpumask
* @cpu: cpu number (< nr_cpu_ids)
--
2.43.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-03-13 2:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-13 2:19 [PATCH 0/4] cleanup dead code in nodemasks and cpumasks Yury Norov
2025-03-13 2:19 ` [PATCH 1/4] nodemask: drop nodes_shift Yury Norov
2025-03-13 2:19 ` [PATCH 2/4] cpumask: add non-atomic __assign_cpu() Yury Norov
2025-03-13 2:19 ` [PATCH 3/4] riscv: switch set_icache_stale_mask() to using non-atomic assign_cpu() Yury Norov
2025-03-13 2:19 ` Yury Norov [this message]
2025-03-24 15:02 ` [PATCH 0/4] cleanup dead code in nodemasks and cpumasks Yury Norov
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=20250313021953.86035-5-yury.norov@gmail.com \
--to=yury.norov@gmail.com \
--cc=alexghiti@rivosinc.com \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=charlie@rivosinc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@rasmusvillemoes.dk \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=samuel.holland@sifive.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