summaryrefslogtreecommitdiffstats
path: root/rust/kernel/task.rs
diff options
context:
space:
mode:
authorValentin Obst <kernel@valentinobst.de>2024-01-31 21:23:29 +0100
committerMiguel Ojeda <ojeda@kernel.org>2024-02-18 21:22:27 +0100
commitebf2b8a75a05a1683596aa73c24c1b5bcd5132ae (patch)
tree368a10184b3f749da6e408722af440416be502d4 /rust/kernel/task.rs
parentrust: str: move SAFETY comment in front of unsafe block (diff)
downloadlinux-ebf2b8a75a05a1683596aa73c24c1b5bcd5132ae.tar.xz
linux-ebf2b8a75a05a1683596aa73c24c1b5bcd5132ae.zip
rust: kernel: unify spelling of refcount in docs
Replace instances of 'ref-count[ed]' with 'refcount[ed]' to increase consistency within the Rust documentation. The latter form is used more widely in the rest of the kernel: ```console $ rg '(\*|//).*?\srefcount(|ed)[\s,.]' | wc -l 1605 $ rg '(\*|//).*?\sref-count(|ed)[\s,.]' | wc -l 43 ``` (numbers are for commit 052d534373b7 ("Merge tag 'exfat-for-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat")) Signed-off-by: Valentin Obst <kernel@valentinobst.de> Reviewed-by: Trevor Gross <tmgross@umich.edu> Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com> Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://lore.kernel.org/r/20240131-doc-fixes-v3-v3-7-0c8af94ed7de@valentinobst.de [ Reworded to use the kernel's commit description style. ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to '')
-rw-r--r--rust/kernel/task.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/kernel/task.rs b/rust/kernel/task.rs
index a3a4007db682..6726f1056066 100644
--- a/rust/kernel/task.rs
+++ b/rust/kernel/task.rs
@@ -39,7 +39,7 @@ macro_rules! current {
///
/// All instances are valid tasks created by the C portion of the kernel.
///
-/// Instances of this type are always ref-counted, that is, a call to `get_task_struct` ensures
+/// Instances of this type are always refcounted, that is, a call to `get_task_struct` ensures
/// that the allocation remains valid at least until the matching call to `put_task_struct`.
///
/// # Examples
@@ -163,7 +163,7 @@ impl Task {
}
}
-// SAFETY: The type invariants guarantee that `Task` is always ref-counted.
+// SAFETY: The type invariants guarantee that `Task` is always refcounted.
unsafe impl crate::types::AlwaysRefCounted for Task {
fn inc_ref(&self) {
// SAFETY: The existence of a shared reference means that the refcount is nonzero.