aboutsummaryrefslogtreecommitdiff
path: root/rust/kernel/sync/lock
diff options
context:
space:
mode:
authorValentin Obst <[email protected]>2024-01-31 21:23:23 +0100
committerMiguel Ojeda <[email protected]>2024-02-18 21:22:27 +0100
commitb6cda913bba42e1fdad82df41d906ff603319743 (patch)
treeb9ae399105ee1f1893a98b552a8f706df1601da7 /rust/kernel/sync/lock
parent789809a3d540bb2108ca58afac5612a3fbd1eda7 (diff)
rust: kernel: fix multiple typos in documentation
Fixes multiple trivial typos in documentation and comments of the kernel crate. allocator: - Fix a trivial list item alignment issue in the last SAFETY comment of `krealloc_aligned`. init: - Replace 'type' with 'trait' in the doc comments of the `PinInit` and `Init` traits. - Add colons before starting lists. - Add spaces between the type and equal sign to respect the code formatting rules in example code. - End a sentence with a full stop instead of a colon. ioctl: - Replace 'an' with 'a' where appropriate. str: - Replace 'Return' with 'Returns' in the doc comment of `bytes_written` as the text describes what the function does. sync/lock: - Fix a trivial list item alignment issue in the Safety section of the `Backend` trait's description. sync/lock/spinlock: - The code in this module operates on spinlocks, not mutexes. Thus, replace 'mutex' with 'spinlock' in the SAFETY comment of `unlock`. workqueue: - Replace "wont" with "won't" in the doc comment of `__enqueue`. Signed-off-by: Valentin Obst <[email protected]> Reviewed-by: Trevor Gross <[email protected]> Reviewed-by: Martin Rodriguez Reboredo <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/kernel/sync/lock')
-rw-r--r--rust/kernel/sync/lock/spinlock.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/sync/lock/spinlock.rs b/rust/kernel/sync/lock/spinlock.rs
index 068535ce1b29..e5e0bf621988 100644
--- a/rust/kernel/sync/lock/spinlock.rs
+++ b/rust/kernel/sync/lock/spinlock.rs
@@ -112,7 +112,7 @@ unsafe impl super::Backend for SpinLockBackend {
unsafe fn unlock(ptr: *mut Self::State, _guard_state: &Self::GuardState) {
// SAFETY: The safety requirements of this function ensure that `ptr` is valid and that the
- // caller is the owner of the mutex.
+ // caller is the owner of the spinlock.
unsafe { bindings::spin_unlock(ptr) }
}
}