[tip: locking/core] rust: sync: completion: Mark inline complete_all and wait_for_completion

From: tip-bot2 for Fabricio Parra

Date: Tue Jun 09 2026 - 04:33:50 EST


The following commit has been merged into the locking/core branch of tip:

Commit-ID: a837dd95e841586c3a6bbe41c41843b392a1b725
Gitweb: https://git.kernel.org/tip/a837dd95e841586c3a6bbe41c41843b392a1b725
Author: Fabricio Parra <a@xxxxxxxxxx>
AuthorDate: Thu, 04 Jun 2026 22:23:31 -07:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Tue, 09 Jun 2026 10:28:06 +02:00

rust: sync: completion: Mark inline complete_all and wait_for_completion

When building the kernel using the llvm-22.1.0-rust-1.93.1-x86_64
toolchain provided by kernel.org with ARCH=x86_64, the following symbols
are generated:

$ nm vmlinux | grep ' _R'.*Completion | rustfilt
ffffffff81827930 T <kernel::sync::completion::Completion>::complete_all
ffffffff81827950 T <kernel::sync::completion::Completion>::wait_for_completion

These Rust methods are thin wrappers around the C completion helpers
`complete_all` and `wait_for_completion`. Mark them `#[inline]` to keep
the wrapper pattern consistent with other small Rust helper methods.

After applying this patch, the above command will produce no output.

Suggested-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
Signed-off-by: Fabricio Parra <a@xxxxxxxxxx>
Signed-off-by: Boqun Feng <boqun@xxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
Link: https://github.com/Rust-for-Linux/linux/issues/1145
Link: https://patch.msgid.link/20260316151056.287-1-a@xxxxxxxxxx
Link: https://patch.msgid.link/20260605052331.1628-4-boqun@xxxxxxxxxx
---
rust/kernel/sync/completion.rs | 2 ++
1 file changed, 2 insertions(+)

diff --git a/rust/kernel/sync/completion.rs b/rust/kernel/sync/completion.rs
index c50012a..35ff049 100644
--- a/rust/kernel/sync/completion.rs
+++ b/rust/kernel/sync/completion.rs
@@ -94,6 +94,7 @@ impl Completion {
///
/// This method wakes up all tasks waiting on this completion; after this operation the
/// completion is permanently done, i.e. signals all current and future waiters.
+ #[inline]
pub fn complete_all(&self) {
// SAFETY: `self.as_raw()` is a pointer to a valid `struct completion`.
unsafe { bindings::complete_all(self.as_raw()) };
@@ -105,6 +106,7 @@ impl Completion {
/// timeout.
///
/// See also [`Completion::complete_all`].
+ #[inline]
pub fn wait_for_completion(&self) {
// SAFETY: `self.as_raw()` is a pointer to a valid `struct completion`.
unsafe { bindings::wait_for_completion(self.as_raw()) };