summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorPeter Novak <seimun018r@gmail.com>2025-11-30 22:12:33 +0100
committerMiguel Ojeda <ojeda@kernel.org>2026-01-26 03:13:27 +0100
commit7f87c7a003125d5af5ec7abbbc0ac21b4a4661ae (patch)
treec4be56cd40981e13e12ef73d77cc8e2c0cb7c89c /rust/kernel
parent4b2dbf44320fc2e4bfd6a2261f16f8fdbfcfbf36 (diff)
rust: use consistent backtick formatting for NULL in docs
Some doc comments use `NULL` while others use plain NULL. Make it consistent by adding backticks everywhere, matching the majority of existing usage. Signed-off-by: Peter Novak <seimun018r@gmail.com> Acked-by: Stephen Boyd <sboyd@kernel.org> Acked-by: David Gow <davidgow@google.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://patch.msgid.link/20251130211233.367946-1-seimun018r@gmail.com [ Reworded slightly. - Miguel ] Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel')
-rw-r--r--rust/kernel/clk.rs2
-rw-r--r--rust/kernel/debugfs/entry.rs2
-rw-r--r--rust/kernel/kunit.rs8
3 files changed, 6 insertions, 6 deletions
diff --git a/rust/kernel/clk.rs b/rust/kernel/clk.rs
index c1cfaeaa36a2..db3464e2df32 100644
--- a/rust/kernel/clk.rs
+++ b/rust/kernel/clk.rs
@@ -94,7 +94,7 @@ mod common_clk {
/// # Invariants
///
/// A [`Clk`] instance holds either a pointer to a valid [`struct clk`] created by the C
- /// portion of the kernel or a NULL pointer.
+ /// portion of the kernel or a `NULL` pointer.
///
/// Instances of this type are reference-counted. Calling [`Clk::get`] ensures that the
/// allocation remains valid for the lifetime of the [`Clk`].
diff --git a/rust/kernel/debugfs/entry.rs b/rust/kernel/debugfs/entry.rs
index 706cb7f73d6c..a30bf8f29679 100644
--- a/rust/kernel/debugfs/entry.rs
+++ b/rust/kernel/debugfs/entry.rs
@@ -148,7 +148,7 @@ impl Entry<'_> {
/// # Guarantees
///
/// Due to the type invariant, the value returned from this function will always be an error
- /// code, NULL, or a live DebugFS directory. If it is live, it will remain live at least as
+ /// code, `NULL`, or a live DebugFS directory. If it is live, it will remain live at least as
/// long as this entry lives.
pub(crate) fn as_ptr(&self) -> *mut bindings::dentry {
self.entry
diff --git a/rust/kernel/kunit.rs b/rust/kernel/kunit.rs
index 21aef6c97325..4ccc8fc4a800 100644
--- a/rust/kernel/kunit.rs
+++ b/rust/kernel/kunit.rs
@@ -190,7 +190,7 @@ pub fn is_test_result_ok(t: impl TestResult) -> bool {
/// Represents an individual test case.
///
-/// The [`kunit_unsafe_test_suite!`] macro expects a NULL-terminated list of valid test cases.
+/// The [`kunit_unsafe_test_suite!`] macro expects a `NULL`-terminated list of valid test cases.
/// Use [`kunit_case_null`] to generate such a delimiter.
#[doc(hidden)]
pub const fn kunit_case(
@@ -212,9 +212,9 @@ pub const fn kunit_case(
}
}
-/// Represents the NULL test case delimiter.
+/// Represents the `NULL` test case delimiter.
///
-/// The [`kunit_unsafe_test_suite!`] macro expects a NULL-terminated list of test cases. This
+/// The [`kunit_unsafe_test_suite!`] macro expects a `NULL`-terminated list of test cases. This
/// function returns such a delimiter.
#[doc(hidden)]
pub const fn kunit_case_null() -> kernel::bindings::kunit_case {
@@ -237,7 +237,7 @@ pub const fn kunit_case_null() -> kernel::bindings::kunit_case {
///
/// # Safety
///
-/// `test_cases` must be a NULL terminated array of valid test cases,
+/// `test_cases` must be a `NULL` terminated array of valid test cases,
/// whose lifetime is at least that of the test suite (i.e., static).
///
/// # Examples